30 #ifndef vtkAbstractImageInterpolator_h 31 #define vtkAbstractImageInterpolator_h 33 #include "vtkImagingCoreModule.h" 36 #define VTK_IMAGE_BORDER_CLAMP 0 37 #define VTK_IMAGE_BORDER_REPEAT 1 38 #define VTK_IMAGE_BORDER_MIRROR 2 60 virtual void ReleaseData();
82 double Interpolate(
double x,
double y,
double z,
int component);
91 bool Interpolate(
const double point[3],
double *
value);
96 void SetOutValue(
double outValue);
104 void SetTolerance(
double tol);
113 void SetComponentOffset(
int offset);
122 void SetComponentCount(
int count);
129 int ComputeNumberOfComponents(
int inputComponents);
136 int GetNumberOfComponents();
144 void InterpolateIJK(
const double point[3],
double *
value);
145 void InterpolateIJK(
const float point[3],
float *
value);
155 bool CheckBoundsIJK(
const double x[3]);
156 bool CheckBoundsIJK(
const float x[3]);
167 void SetBorderMode(
int mode);
175 const char *GetBorderModeAsString();
185 void SetSlidingWindow(
bool x);
196 virtual void ComputeSupportSize(
const double matrix[16],
int support[3]) = 0;
204 virtual bool IsSeparable() = 0;
217 virtual void PrecomputeWeightsForExtent(
218 const double matrix[16],
const int extent[6],
int checkExtent[6],
220 virtual void PrecomputeWeightsForExtent(
221 const float matrix[16],
const int extent[6],
int checkExtent[6],
239 double *
value,
int n);
242 float *
value,
int n);
249 vtkGetVector3Macro(Spacing,
double);
256 vtkGetVector3Macro(Origin,
double);
263 vtkGetVector6Macro(Extent,
int);
271 VTK_LEGACY(
int *GetWholeExtent());
272 VTK_LEGACY(
void GetWholeExtent(
int extent[6]));
282 virtual void InternalUpdate() = 0;
293 virtual void GetInterpolationFunc(
296 virtual void GetInterpolationFunc(
305 virtual void GetRowInterpolationFunc(
308 virtual void GetRowInterpolationFunc(
317 virtual void GetSlidingWindowFunc(
320 virtual void GetSlidingWindowFunc(
326 double StructuredBoundsDouble[6];
327 float StructuredBoundsFloat[6];
341 void (*InterpolationFuncDouble)(
343 void (*InterpolationFuncFloat)(
346 void (*RowInterpolationFuncDouble)(
348 double *outPtr,
int n);
349 void (*RowInterpolationFuncFloat)(
351 float *outPtr,
int n);
374 return !((x[0] < bounds[0]) || (x[0] > bounds[1]) ||
375 (x[1] < bounds[2]) || (x[1] > bounds[3]) ||
376 (x[2] < bounds[4]) || (x[2] > bounds[5]));
382 return !((x[0] < bounds[0]) || (x[0] > bounds[1]) ||
383 (x[1] < bounds[2]) || (x[1] > bounds[3]) ||
384 (x[2] < bounds[4]) || (x[2] > bounds[5]));
389 double *
value,
int 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
float StructuredBoundsFloat[6]
abstract superclass for arrays of numeric data
int GetBorderMode()
The border mode (default: clamp).
void(* InterpolationFuncFloat)(vtkInterpolationInfo *info, const float point[3], float *outPtr)
#define VTK_IMAGE_BORDER_MIRROR
void(* RowInterpolationFuncDouble)(vtkInterpolationWeights *weights, int idX, int idY, int idZ, double *outPtr, int n)
double StructuredBoundsDouble[6]
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...
void(* RowInterpolationFuncFloat)(vtkInterpolationWeights *weights, int idX, int idY, int idZ, float *outPtr, int n)
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(* InterpolationFuncDouble)(vtkInterpolationInfo *info, const double point[3], double *outPtr)
void SetBorderModeToMirror()
The border mode (default: clamp).