29 #ifndef __vtkAbstractImageInterpolator_h
30 #define __vtkAbstractImageInterpolator_h
34 #define VTK_IMAGE_BORDER_CLAMP 0
35 #define VTK_IMAGE_BORDER_REPEAT 1
36 #define VTK_IMAGE_BORDER_MIRROR 2
55 virtual void ReleaseData();
71 double Interpolate(
double x,
double y,
double z,
int component);
78 bool Interpolate(
const double point[3],
double *
value);
82 void SetOutValue(
double outValue);
90 void SetTolerance(
double tol);
99 void SetComponentOffset(
int offset);
108 void SetComponentCount(
int count);
114 int ComputeNumberOfComponents(
int inputComponents);
119 int GetNumberOfComponents();
125 void InterpolateIJK(
const double point[3],
double *
value);
126 void InterpolateIJK(
const float point[3],
float *
value);
134 bool CheckBoundsIJK(
const double x[3]);
135 bool CheckBoundsIJK(
const float x[3]);
144 void SetBorderMode(
int mode);
152 const char *GetBorderModeAsString();
160 virtual void ComputeSupportSize(
const double matrix[16],
int support[3]) = 0;
166 virtual bool IsSeparable() = 0;
177 virtual void PrecomputeWeightsForExtent(
178 const double matrix[16],
const int extent[6],
int checkExtent[6],
180 virtual void PrecomputeWeightsForExtent(
181 const float matrix[16],
const int extent[6],
int checkExtent[6],
195 double *
value,
int n);
198 float *
value,
int n);
203 vtkGetVector3Macro(Spacing,
double);
208 vtkGetVector3Macro(Origin,
double);
213 vtkGetVector6Macro(Extent,
int);
219 vtkGetVector6Macro(WholeExtent,
int);
227 virtual void InternalUpdate() = 0;
234 virtual void GetInterpolationFunc(
237 virtual void GetInterpolationFunc(
244 virtual void GetRowInterpolationFunc(
247 virtual void GetRowInterpolationFunc(
253 double StructuredBoundsDouble[6];
254 float StructuredBoundsFloat[6];
268 void (*InterpolationFuncDouble)(
270 void (*InterpolationFuncFloat)(
273 void (*RowInterpolationFuncDouble)(
275 double *outPtr,
int n);
276 void (*RowInterpolationFuncFloat)(
278 float *outPtr,
int n);
301 return !((x[0] < bounds[0]) | (x[0] > bounds[1]) |
302 (x[1] < bounds[2]) | (x[1] > bounds[3]) |
303 (x[2] < bounds[4]) | (x[2] > bounds[5]));
309 return !((x[0] < bounds[0]) | (x[0] > bounds[1]) |
310 (x[1] < bounds[2]) | (x[1] > bounds[3]) |
311 (x[2] < bounds[4]) | (x[2] > bounds[5]));
316 double *
value,
int n)