pyvista.ImageEllipsoidSource

pyvista.ImageEllipsoidSource#

class ImageEllipsoidSource(whole_extent=None, center=None, radius=None)[source]#

Create a binary image of an ellipsoid class.

Added in version 0.44.0.

Parameters:
whole_extentsequence[int]

The extent of the whole output image.

centersequence[float]

The center of the ellipsoid.

radiustuple

The radius of the ellipsoid.

Examples

Create an image of an ellipsoid.

>>> import pyvista as pv
>>> source = pv.ImageEllipsoidSource(
...     whole_extent=(0, 20, 0, 20, 0, 0),
...     center=(10, 10, 0),
...     radius=(3, 4, 5),
... )
>>> source.output.plot(cpos="xy")
../../../_images/pyvista-ImageEllipsoidSource-1_00_00.png

Methods

Attributes

ImageEllipsoidSource.center

Get the center of the ellipsoid.

ImageEllipsoidSource.output

Get the output image as a ImageData.

ImageEllipsoidSource.radius

Get the radius of the ellipsoid.

ImageEllipsoidSource.whole_extent

Get extent of the whole output image.