pyvista.ImageGaussianSource

pyvista.ImageGaussianSource#

class ImageGaussianSource(center=None, whole_extent=None, maximum=None, std=None)[source]#

Create a binary image with Gaussian pixel values.

Added in version 0.44.0.

Parameters:
centersequence[float]

The center of the gaussian.

whole_extentsequence[int]

The extent of the whole output image.

maximumfloat

The maximum value of the gaussian.

stdsequence[float]

The standard deviation of the gaussian.

Examples

Create an image of Gaussian pixel values.

>>> import pyvista as pv
>>> source = pv.ImageGaussianSource(
...     center=(100, 100, 0),
...     whole_extent=(0, 200, 0, 200, 0, 0),
...     maximum=255,
...     std=100.0,
... )
>>> source.output.plot(cpos="xy")
../../../_images/pyvista-ImageGaussianSource-1_00_00.png

Methods

Attributes

ImageGaussianSource.center

Get the center of the gaussian.

ImageGaussianSource.maximum

Get the maximum value of the gaussian.

ImageGaussianSource.output

Get the output image as a ImageData.

ImageGaussianSource.std

Get the standard deviation of the gaussian.

ImageGaussianSource.whole_extent

Get extent of the whole output image.