Skip to content

SampleFunction ​

Introduction ​

vtkSampleFunction samples an implicit function over a volume. For example, a vtkPlane or vtkSphere can be defined, along with a volume extent (dimensions and geometric bounds), and the filter will then sample the implicit function over all voxels, producing a vtkImageData.

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkSampleFunction characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesISampleFunctionInitialValuesNo(default: {})

getMTime ​

The modified time is the maximum of this object's own modified time and that of the implicit function being sampled.

getModelBounds ​

Get the bounds of the volume in 3D space.

getModelBoundsByReference ​

getSampleDimensions ​

Get the dimensions of the volume in the x-y-z directions.

getSampleDimensionsByReference ​

newInstance ​

Method used to create a new instance of vtkSampleFunction

ArgumentTypeRequiredDescription
initialValuesISampleFunctionInitialValuesNofor pre-setting some of its content

requestData ​

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setModelBounds ​

Set the bounds of the volume in 3D space.

setModelBounds ​

Set the bounds of the volume in 3D space.

ArgumentTypeRequiredDescription
modelBoundsBoundsYes

setModelBoundsFrom ​

ArgumentTypeRequiredDescription
modelBoundsBoundsYes

setSampleDimensions ​

Set the dimensions of the volume in the x-y-z directions.

ArgumentTypeRequiredDescription
xNumberYes
yNumberYes
zNumberYes

setSampleDimensions ​

Set the dimensions of the volume in the x-y-z directions.

ArgumentTypeRequiredDescription
sampleDimensionsVector3Yes

setSampleDimensionsFrom ​

ArgumentTypeRequiredDescription
sampleDimensionsVector3Yes