pyvista.ImageSinusoidSource

pyvista.ImageSinusoidSource#

class ImageSinusoidSource(
whole_extent=None,
direction=None,
period=None,
phase=None,
amplitude=None,
)[source]#

Create an image of a sinusoid.

Added in version 0.44.0.

Parameters:
whole_extentsequence[int]

The extent of the whole output image.

directiontuple

The direction vector which determines the sinusoidal orientation.

periodfloat

The period of the sinusoid in pixel.

phasetuple

The phase of the sinusoid in pixel.

amplitudefloat

The magnitude of the sinusoid.

Examples

Create an image of a sinusoid.

>>> import pyvista as pv
>>> source = pv.ImageSinusoidSource(
...     whole_extent=(0, 200, 0, 200, 0, 0),
...     period=20.0,
...     phase=0.0,
...     amplitude=255,
...     direction=(1.0, 0.0, 0.0),
... )
>>> source.output.plot(cpos='xy')
../../../_images/pyvista-ImageSinusoidSource-1_00_00.png

Methods

Attributes

ImageSinusoidSource.amplitude

Get the magnitude of the sinusoid.

ImageSinusoidSource.direction

Get the direction of the sinusoid.

ImageSinusoidSource.output

Get the output image as a ImageData.

ImageSinusoidSource.period

Get the period of the sinusoid.

ImageSinusoidSource.phase

Get the phase of the sinusoid.

ImageSinusoidSource.whole_extent

Get extent of the whole output image.