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.
| Argument | Type | Required | Description |
|---|---|---|---|
point | Vector3 | Yes | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IAbstractImageInterpolatorInitialValues | No | (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().
| Argument | Type | Required | Description |
|---|---|---|---|
data | vtkImageData | Yes | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
point | Vector3 | Yes | The world coordinate. |
value | Yes | Output array, filled with the interpolated components. |
interpolateIJK
Interpolate at the given structured (index space) coordinate.
| Argument | Type | Required | Description |
|---|---|---|---|
point | Vector3 | Yes | The structured coordinate. |
value | Yes | Output 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
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IAbstractImageInterpolatorInitialValues | No | for 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.
| Argument | Type | Required | Description |
|---|---|---|---|
borderMode | ImageBorderMode | Yes |
setComponentCount
Number of scalar components to interpolate, starting at componentOffset. A value of -1 means all remaining components.
| Argument | Type | Required | Description |
|---|---|---|---|
componentCount | Number | Yes |
setComponentOffset
Index of the first scalar component to interpolate.
| Argument | Type | Required | Description |
|---|---|---|---|
componentOffset | Number | Yes |
setOutValue
Value returned for positions that lie outside of the image.
| Argument | Type | Required | Description |
|---|---|---|---|
outValue | Number | Yes |
setSlidingWindow
| Argument | Type | Required | Description |
|---|---|---|---|
slidingWindow | Boolean | Yes |
setTolerance
Tolerance, in structured coordinates, by which the image bounds are enlarged when checking whether a position can be interpolated.
| Argument | Type | Required | Description |
|---|---|---|---|
tolerance | Number | Yes |
update
Recompute the structured bounds and the interpolation info from the current scalars. Must be called after any option is changed.