Advanced visualization with ParaView

Gradients calculation:

  • Gradient filer calculated the derivatives of scalar, vectors, tensors, etc. in 3D space in x, y, and z directions.
  • There are two different gradient filers available in ParaView that are optimized for structured and unstructured grids.
  • The gradient filter for unstructured grids is the most general derivative calculation filter, which even is possible to apply it to structured grids. But, the gradient filter for structured grids cannot be used for unstructured meshes.
  • If you apply gradient filter on a scalar field, it generates a vector field, but if you apply gradient filter on a vector field, it generates a tensor rank 2 in three-dimensional space.
  • Gradient filter is mostly used for visualizing the changes in 3D space of scalars, vectors, etc.

Gradients Filter for Structured Grids:

  • The inputs for the gradient filter that calculates the derivatives of only scalars field is the name of the variable that you want to calculate its gradient and also the dimensionality of the dataset, which in this case three.
  • By looking at the result of the gradient filter, we see that it specially identifies the interfaces or boundaries where we have the highest variation.

Gradients Filter for Unstructured Grids:

  • The input for gradient of unstructured dataset could be scalars, vectors, tensors, etc.
  • It's more accurate to calculate gradients when you variables are attributed to the points (point data) instead cell data condition.

Glyph filter:

  • Glyph filter basically visualize the vectors by putting an arrow in each point of datasets and attributing a color to that arrow two combine scalars and vectors field visualization.
  • In this case we have velocity field and we want to understand the direction and structure of this velocity field, so using Glyph filter is suitable for visualization.
  • In ParaView, you can change the glyph type, but the most usual choice is using Arrow.
  • Orientation Array: You need to define your vector field that would be used for generating the glyphs.
  • Scale Array: This option scales the size of the glyphs based on a scalar field.
  • For generating the glyphs you need to define how many points of the 3D dataset need to be masked and used for the glyph generation. If you choose a uniform distribution, it chooses the points by generating random numbers with uniform distribution across your dataset with the number that you defined. This uniform random sampling could be done at the surface, volume, or both regions of your 3D dataset.
  • Another options for choosing the points are Every Nth Points and All Points, where their names are their descriptions.

MAsk points:

  • The Mask Points filter chooses points based on a predefined behavior.
  • The option for masking points that is available in graphical interface of the ParaView is uniform sampling based on the maximum number of points and the ratio or interval between the points that would be chosen.
  • In order to have a uniform sampling over all the points of the geometry, you need to find the number of points available in your dataset by looking at the information section:

Then you divide the number of all the points by the number of points that you want to choose, use it as a ratio for masking:

Streamline filter with custom source:

  • There is another visualization tool similar to glyphs that is call streamline filter.
  • Streamline filter represents the vectors field by lines that shows the direction of vectors field and color on those lines to represent a scalar variable.
  • Instead of using conventional Glyph filter and put the information how to mask the points to generate the glyphs, now we learned how to mask the points whatever we wants, and now we could Streamline Filter with Custom Source by feeding the defined mask points as the source:
  • The other inputs for generating the streamlines are the vectors that need to be used for generating the streamlines, integration direction and type, which for most cases the default values work perfectly:

Extract surface of a volumetric dataset:

  • In order to work with surface of volumetric datasets, there is an Extract Surface filter available in ParaView that just gives you the surface points and cells, which is suitable for surface analysis:

Calculating the normal vectors of a surface:

  • Generate Normal Vector filter in ParaView, calculates the normal vector of an arbitrary surface:
  • Here the normal vectors are visualized by Glyph Filter.
  • You can flip the orientation of normal vectors by using Flip Normals option.
  • You can compute the cell normal vectors besides point normal vectors by using Compute Cell Normals option.

Calculating Curvature of a Surface:

  • It's possible to calculate mean and Gaussian curvatures of surfaces in ParaView:

Visualizing molecular structures:

  • ParaView has a option to visualize molecular structures based on PDB (Protein Data Bank) file format.
  • It is possible to visualize molecules by using Van der Waals mode, ball and stick mode, etc.:

Saving visualization state:

  • In order to save a pipeline that are created based on various filters or rendering mode, it is possible to save the visualization state as a file and then load it again to get the same visualization scene again: