pyvista.ImageData.dimensionality

pyvista.ImageData.dimensionality#

property ImageData.dimensionality: int[source]#

Return the dimensionality of the grid.

Returns:
int

The grid dimensionality.

Examples

Get the dimensionality of a uniform grid with dimensions (1, 2, 3).

>>> import pyvista as pv
>>> grid = pv.ImageData(dimensions=(2, 3, 4))
>>> grid.dimensionality
3