Go to the documentation of this file.
33 #ifndef vtkAbstractImageInterpolator_h
34 #define vtkAbstractImageInterpolator_h
36 #include "vtkImagingCoreModule.h"
39 #define VTK_IMAGE_BORDER_CLAMP 0
40 #define VTK_IMAGE_BORDER_REPEAT 1
41 #define VTK_IMAGE_BORDER_MIRROR 2
147 void InterpolateIJK(
const double point[3],
double *
value);
148 void InterpolateIJK(
const float point[3],
float *
value);
158 bool CheckBoundsIJK(
const double x[3]);
159 bool CheckBoundsIJK(
const float x[3]);
209 const double matrix[16],
const int extent[6],
int checkExtent[6],
212 const float matrix[16],
const int extent[6],
int checkExtent[6],
230 double *
value,
int n);
233 float *
value,
int n);
240 vtkGetVector3Macro(Spacing,
double);
247 vtkGetVector3Macro(Origin,
double);
254 vtkGetVector6Macro(Extent,
int);
305 double StructuredBoundsDouble[6];
306 float StructuredBoundsFloat[6];
319 void (*InterpolationFuncDouble)(
321 void (*InterpolationFuncFloat)(
324 void (*RowInterpolationFuncDouble)(
326 double *outPtr,
int n);
327 void (*RowInterpolationFuncFloat)(
329 float *outPtr,
int n);
352 return !((x[0] < bounds[0]) | (x[0] > bounds[1]) |
353 (x[1] < bounds[2]) | (x[1] > bounds[3]) |
354 (x[2] < bounds[4]) | (x[2] > bounds[5]));
360 return !((x[0] < bounds[0]) | (x[0] > bounds[1]) |
361 (x[1] < bounds[2]) | (x[1] > bounds[3]) |
362 (x[2] < bounds[4]) | (x[2] > bounds[5]));
367 double *
value,
int n)
virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights)
Free the weights that were provided by PrecomputeWeightsForExtent.
virtual void GetInterpolationFunc(void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *))
void SetComponentCount(int count)
This method specifies the number of components to extract.
virtual void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
Get the row interpolation functions.
void SetTolerance(double tol)
The tolerance to apply when checking whether a point is out of bounds.
vtkAbstractImageInterpolator()
void SetComponentOffset(int offset)
This method specifies which component of the input will be interpolated, or if ComponentCount is also...
void(* InterpolationFuncFloat)(vtkInterpolationInfo *info, const float point[3], float *outPtr)
void(* InterpolationFuncDouble)(vtkInterpolationInfo *info, const double point[3], double *outPtr)
int ComputeNumberOfComponents(int inputComponents)
Compute the number of output components based on the ComponentOffset, ComponentCount,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract base class for most VTK objects
#define VTK_IMAGE_BORDER_MIRROR
int GetNumberOfComponents()
Get the number of components that will be returned when Interpolate() is called.
abstract superclass for arrays of numeric data
bool CheckBoundsIJK(const double x[3])
Check an x,y,z point to see if it is within the bounds for the structured coords of the image.
virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj)=0
Subclass-specific copy.
float StructuredBoundsFloat[6]
virtual void ReleaseData()
Release any data stored by the interpolator.
void GetWholeExtent(int extent[6])
void DeepCopy(vtkAbstractImageInterpolator *obj)
Copy the interpolator.
~vtkAbstractImageInterpolator()
#define VTK_IMAGE_BORDER_CLAMP
void SetBorderMode(int mode)
The border mode (default: clamp).
void SetBorderModeToRepeat()
virtual void ComputeSupportSize(const double matrix[16], int support[3])=0
Get the support size for use in computing update extents.
void(* RowInterpolationFuncDouble)(vtkInterpolationWeights *weights, int idX, int idY, int idZ, double *outPtr, int n)
void Update()
Update the interpolator.
topologically and geometrically regular array of data
a simple class to control print indentation
void InterpolateIJK(const double point[3], double *value)
A version of Interpolate that takes structured coords instead of data coords.
virtual void InternalUpdate()=0
Subclass-specific updates.
virtual void Initialize(vtkDataObject *data)
Initialize the interpolator with the data that you wish to interpolate.
#define VTK_IMAGE_BORDER_REPEAT
void InterpolateRow(vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, double *value, int n)
Get a row of samples, using the weights that were precomputed by PrecomputeWeightsForExtent.
void SetBorderModeToMirror()
void SetBorderModeToClamp()
int * GetWholeExtent()
Get the whole extent of the data being interpolated, including parts of the data that are not current...
bool Interpolate(const double point[3], double *value)
Sample the input data.
virtual void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int checkExtent[6], vtkInterpolationWeights *&weights)
virtual bool IsSeparable()=0
True if the interpolation is separable, which means that the weights can be precomputed in order to a...
double Interpolate(double x, double y, double z, int component)
Get the result of interpolating the specified component of the input data, which should be set to zer...
virtual void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *))
Get the interpolation functions.
vtkInterpolationInfo * InterpolationInfo
void SetOutValue(double outValue)
The value to return when the point is out of bounds.
interpolate data values from images
general representation of visualization data
virtual void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int checkExtent[6], vtkInterpolationWeights *&weights)
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
void(* RowInterpolationFuncFloat)(vtkInterpolationWeights *weights, int idX, int idY, int idZ, float *outPtr, int n)
double StructuredBoundsDouble[6]
virtual void GetRowInterpolationFunc(void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int))
const char * GetBorderModeAsString()