Skip to content

AbstractImageInterpolator ​

Introduction ​

vtkAbstractImageInterpolator provides an abstract interface for interpolating image data. The initialize() method takes a vtkImageData as input and caches everything the interpolation kernels need; subclasses supply the kernels themselves through interpolatePoint() and interpolateRow().

Methods ​

FreePrecomputedWeights ​

checkBoundsIJK ​

Check whether a structured coordinate lies within the structured bounds.

ArgumentTypeRequiredDescription
pointVector3YesThe structured coordinate.

computeNumberOfComponents ​

Number of components that will be interpolated given an input component count, taking componentOffset and componentCount into account.

computeSupportSize ​

Size of the interpolation kernel along each axis. null on the abstract class, subclasses provide the implementation.

extend ​

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

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

getBorderMode ​

getComponentCount ​

getComponentOffset ​

getNumberOfComponents ​

getOrigin ​

Origin of the image passed to initialize().

getOutValue ​

getSlidingWindow ​

getSpacing ​

Spacing of the image passed to initialize().

getTolerance ​

initialize ​

Setup the interpolator for the given image: caches its scalars, spacing, origin and extent then calls update().

ArgumentTypeRequiredDescription
datavtkImageDataYesThe image to interpolate.

internalUpdate ​

Hook called at the end of update() for subclasses to update their own state. Does nothing on the abstract class.

interpolate ​

Interpolate all components at the given world position into value. Returns false and fills value with outValue when the position is outside of the structured bounds.

ArgumentTypeRequiredDescription
pointVector3YesThe world coordinate.
valueYesOutput array, filled with the interpolated components.

interpolateIJK ​

Interpolate at the given structured (index space) coordinate.

ArgumentTypeRequiredDescription
pointVector3YesThe structured coordinate.
valueYesOutput array, filled with the interpolated components.

interpolatePoint ​

Interpolation kernel. Does nothing on the abstract class.

interpolateRow ​

Row interpolation kernel. Does nothing on the abstract class.

interpolateXYZ ​

Interpolate a single component at the given world position. Returns outValue when the position is outside of the structured bounds.

isSeparable ​

Whether the interpolation kernel is separable. null on the abstract class, subclasses provide the implementation.

newInstance ​

Method used to create a new instance of vtkAbstractImageInterpolator

ArgumentTypeRequiredDescription
initialValuesIAbstractImageInterpolatorInitialValuesNofor pre-setting some of its content

precomputeWeightsForExtent ​

releaseData ​

Drop the reference to the scalars that were set by initialize().

setBorderMode ​

How out-of-extent indices are mapped back into the extent.

ArgumentTypeRequiredDescription
borderModeImageBorderModeYes

setComponentCount ​

Number of scalar components to interpolate, starting at componentOffset. A value of -1 means all remaining components.

ArgumentTypeRequiredDescription
componentCountNumberYes

setComponentOffset ​

Index of the first scalar component to interpolate.

ArgumentTypeRequiredDescription
componentOffsetNumberYes

setOutValue ​

Value returned for positions that lie outside of the image.

ArgumentTypeRequiredDescription
outValueNumberYes

setSlidingWindow ​

ArgumentTypeRequiredDescription
slidingWindowBooleanYes

setTolerance ​

Tolerance, in structured coordinates, by which the image bounds are enlarged when checking whether a position can be interpolated.

ArgumentTypeRequiredDescription
toleranceNumberYes

update ​

Recompute the structured bounds and the interpolation info from the current scalars. Must be called after any option is changed.