pyvista.ImageNoiseSource#

class ImageNoiseSource(
whole_extent=(0, 255, 0, 255, 0, 0),
minimum=0.0,
maximum=1.0,
seed=None,
)[source]#

Create an image filled with uniform noise.

Added in version 0.44.0.

Parameters:
whole_extentsequence[int]

The extent of the whole output image.

minimumfloat

The minimum value for the generated noise.

maximumfloat

The maximum value for the generated noise.

seedint, optional

Seed the random number generator with a value.

Examples

Create an image of noise.

>>> import pyvista as pv
>>> source = pv.ImageNoiseSource(
...     whole_extent=(0, 200, 0, 200, 0, 0),
...     minimum=0,
...     maximum=255,
...     seed=0,
... )
>>> source.output.plot(cpos="xy")
../../../_images/pyvista-ImageNoiseSource-1_00_00.png

Methods

ImageNoiseSource.seed(value)

Seed the random number generator with a value.

Attributes

ImageNoiseSource.maximum

Get the maximum value for the generated noise.

ImageNoiseSource.minimum

Get the minimum value for the generated noise.

ImageNoiseSource.output

Get the output image as a ImageData.

ImageNoiseSource.whole_extent

Get extent of the whole output image.