Skip to content

ImageInterpolator ​

Introduction ​

vtkImageInterpolator provides nearest-neighbor, trilinear and tricubic interpolation of vtkImageData.

Methods ​

computeSupportSize ​

Size of the interpolation kernel along each axis: 1 for nearest, 2 for linear and 4 for cubic. When matrix describes an integer mapping along an axis, that axis needs no interpolation and gets a size of 1.

ArgumentTypeRequiredDescription
matrixYesOptional 4x4 row-major matrix, or null.

extend ​

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

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

getInterpolationMode ​

interpolateCubic ​

Tricubic interpolation kernel.

interpolateLinear ​

Trilinear interpolation kernel.

interpolateNearest ​

Nearest-neighbor interpolation kernel.

interpolateRowLinear ​

Trilinear row kernel.

interpolateRowNearest ​

Nearest-neighbor row kernel.

isSeparable ​

newInstance ​

Method used to create a new instance of vtkImageInterpolator

ArgumentTypeRequiredDescription
initialValuesIImageInterpolatorInitialValuesNofor pre-setting some of its content

precomputeWeightsForExtent ​

Precompute the per-axis positions and weights needed to resample the given output extent, and report the portion of it that lies inside the input data in clipExt.

ArgumentTypeRequiredDescription
matrixYes4x4 row-major matrix mapping output to input indices.
outExtExtentYesThe output extent.
clipExtExtentYesFilled with the clipped output extent.

setInterpolationMode ​

ArgumentTypeRequiredDescription
interpolationModeInterpolationModeYes

vtkTricubicInterpWeights ​

Cubic interpolation weights for a fractional position.