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 63 virtual void ReleaseData();
85 double Interpolate(
double x,
double y,
double z,
int component);
94 bool Interpolate(
const double point[3],
double *
value);
99 void SetOutValue(
double outValue);
107 void SetTolerance(
double tol);
116 void SetComponentOffset(
int offset);
125 void SetComponentCount(
int count);
132 int ComputeNumberOfComponents(
int inputComponents);
139 int GetNumberOfComponents();
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]);
170 void SetBorderMode(
int mode);
178 const char *GetBorderModeAsString();
188 void SetSlidingWindow(
bool x);
199 virtual void ComputeSupportSize(
const double matrix[16],
int support[3]) = 0;
207 virtual bool IsSeparable() = 0;
220 virtual void PrecomputeWeightsForExtent(
221 const double matrix[16],
const int extent[6],
int checkExtent[6],
223 virtual void PrecomputeWeightsForExtent(
224 const float matrix[16],
const int extent[6],
int checkExtent[6],
242 double *value,
int n);
245 float *value,
int n);
252 vtkGetVector3Macro(Spacing,
double);
259 vtkGetVector3Macro(Origin,
double);
266 vtkGetVector6Macro(Extent,
int);
274 VTK_LEGACY(
int *GetWholeExtent());
275 VTK_LEGACY(
void GetWholeExtent(
int extent[6]));
285 virtual void InternalUpdate() = 0;
296 virtual void GetInterpolationFunc(
299 virtual void GetInterpolationFunc(
308 virtual void GetRowInterpolationFunc(
311 virtual void GetRowInterpolationFunc(
320 virtual void GetSlidingWindowFunc(
323 virtual void GetSlidingWindowFunc(
329 double StructuredBoundsDouble[6];
330 float StructuredBoundsFloat[6];
344 void (*InterpolationFuncDouble)(
346 void (*InterpolationFuncFloat)(
349 void (*RowInterpolationFuncDouble)(
351 double *outPtr,
int n);
352 void (*RowInterpolationFuncFloat)(
354 float *outPtr,
int n);
365 this->InterpolationFuncDouble(this->InterpolationInfo, point, value);
371 this->InterpolationFuncFloat(this->InterpolationInfo, point, value);
376 const double *bounds = this->StructuredBoundsDouble;
377 return !((x[0] < bounds[0]) || (x[0] > bounds[1]) ||
378 (x[1] < bounds[2]) || (x[1] > bounds[3]) ||
379 (x[2] < bounds[4]) || (x[2] > bounds[5]));
384 const float *bounds = this->StructuredBoundsFloat;
385 return !((x[0] < bounds[0]) || (x[0] > bounds[1]) ||
386 (x[1] < bounds[2]) || (x[1] > bounds[3]) ||
387 (x[2] < bounds[4]) || (x[2] > bounds[5]));
392 double *
value,
int n)
394 this->RowInterpolationFuncDouble(weights, xIdx, yIdx, zIdx, value, n);
401 this->RowInterpolationFuncFloat(weights, xIdx, yIdx, zIdx, value, n);
interpolate data values from images
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetBorderModeToRepeat()
The border mode (default: clamp).
#define VTK_IMAGE_BORDER_REPEAT
#define VTK_IMAGE_BORDER_CLAMP
void InterpolateIJK(const double point[3], double *value)
A version of Interpolate that takes structured coords instead of data coords.
vtkInterpolationInfo * InterpolationInfo
a simple class to control print indentation
topologically and geometrically regular array of data
abstract superclass for arrays of numeric data
int GetBorderMode()
The border mode (default: clamp).
#define VTK_IMAGE_BORDER_MIRROR
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...
general representation of visualization data
void SetBorderModeToClamp()
The border mode (default: clamp).
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()
The border mode (default: clamp).