Gridded Data#

Gridded datasets in PyVista are datasets with topologically regular point spacing. These are less flexible than Point Sets, but are much more memory efficient as they can be described with a handful of parameters rather than having to explicitly describe the points and geometry of the dataset.

PyVista gridded data is composed of the pyvista.RectilinearGrid and pyvista.ImageData classes. These classes inherit from the vtkRectilinearGrid and vtkImageData classes and are commonly used to model images or volumetric data.

A pyvista.RectilinearGrid is used for modeling datasets with variable spacing in the three coordinate directions.

../../_images/grids_1_0.png

A pyvista.ImageData is used for modeling datasets with uniform spacing in the three coordinate directions.

../../_images/grids_2_0.png

Class Descriptions

The following table describes PyVista’s grid set classes. These classes inherit all methods from their corresponding VTK vtkRectilinearGrid and vtkImageData superclasses.

pyvista.RectilinearGrid(*args, **kwargs)

Dataset with variable spacing in the three coordinate directions.

pyvista.ImageData(*args, **kwargs)

Models datasets with uniform spacing in the three coordinate directions.