29 #ifndef __vtkAbstractImageInterpolator_h
30 #define __vtkAbstractImageInterpolator_h
32 #include "vtkImagingCoreModule.h"
35 #define VTK_IMAGE_BORDER_CLAMP 0
36 #define VTK_IMAGE_BORDER_REPEAT 1
37 #define VTK_IMAGE_BORDER_MIRROR 2
56 virtual void ReleaseData();
72 double Interpolate(
double x,
double y,
double z,
int component);
79 bool Interpolate(
const double point[3],
double *
value);
83 void SetOutValue(
double outValue);
91 void SetTolerance(
double tol);
100 void SetComponentOffset(
int offset);
109 void SetComponentCount(
int count);
115 int ComputeNumberOfComponents(
int inputComponents);
120 int GetNumberOfComponents();
126 void InterpolateIJK(
const double point[3],
double *
value);
127 void InterpolateIJK(
const float point[3],
float *
value);
135 bool CheckBoundsIJK(
const double x[3]);
136 bool CheckBoundsIJK(
const float x[3]);
145 void SetBorderMode(
int mode);
153 const char *GetBorderModeAsString();
161 virtual void ComputeSupportSize(
const double matrix[16],
int support[3]) = 0;
167 virtual bool IsSeparable() = 0;
178 virtual void PrecomputeWeightsForExtent(
179 const double matrix[16],
const int extent[6],
int checkExtent[6],
181 virtual void PrecomputeWeightsForExtent(
182 const float matrix[16],
const int extent[6],
int checkExtent[6],
196 double *
value,
int n);
199 float *
value,
int n);
204 vtkGetVector3Macro(Spacing,
double);
209 vtkGetVector3Macro(Origin,
double);
214 vtkGetVector6Macro(Extent,
int);
220 vtkGetVector6Macro(WholeExtent,
int);
228 virtual void InternalUpdate() = 0;
235 virtual void GetInterpolationFunc(
238 virtual void GetInterpolationFunc(
245 virtual void GetRowInterpolationFunc(
248 virtual void GetRowInterpolationFunc(
254 double StructuredBoundsDouble[6];
255 float StructuredBoundsFloat[6];
269 void (*InterpolationFuncDouble)(
271 void (*InterpolationFuncFloat)(
274 void (*RowInterpolationFuncDouble)(
276 double *outPtr,
int n);
277 void (*RowInterpolationFuncFloat)(
279 float *outPtr,
int n);
302 return !((x[0] < bounds[0]) | (x[0] > bounds[1]) |
303 (x[1] < bounds[2]) | (x[1] > bounds[3]) |
304 (x[2] < bounds[4]) | (x[2] > bounds[5]));
310 return !((x[0] < bounds[0]) | (x[0] > bounds[1]) |
311 (x[1] < bounds[2]) | (x[1] > bounds[3]) |
312 (x[2] < bounds[4]) | (x[2] > bounds[5]));
317 double *
value,
int n)