create_grid#
- create_grid(
- dataset: DataSet,
- dimensions: VectorLike[int] | None = (101, 101, 101),
Create a uniform grid surrounding the given dataset.
The output grid will have the specified dimensions and is commonly used for interpolating the input dataset.
- Parameters:
- Returns:
ImageDataA uniform grid with the specified dimensions that surrounds the input dataset.
- Raises:
NotImplementedErrorIf the dimensions parameter is set to None. Currently, the function does not support automatically determining the “optimal” grid size based on the sparsity of the points in the input dataset.
See Also#
pyvista.DataObjectFilters.resample_to_imageBuild a grid and resample the dataset onto it in a single call. Its voxels fit the dataset’s bounds, whereas this grid’s points lie on them.
Used In#
Gallery Examples