29 #ifndef vtkAbstractImageInterpolator_h 30 #define vtkAbstractImageInterpolator_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);
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);
290 this->InterpolationFuncDouble(this->InterpolationInfo, point, value);
296 this->InterpolationFuncFloat(this->InterpolationInfo, point, value);
301 double *bounds = this->StructuredBoundsDouble;
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]));
309 float *bounds = this->StructuredBoundsFloat;
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]));
319 this->RowInterpolationFuncDouble(weights, xIdx, yIdx, zIdx, value, n);
326 this->RowInterpolationFuncFloat(weights, xIdx, yIdx, zIdx, value, n);
GLsizei GLsizei GLenum GLenum const GLvoid * data
interpolate data values from images
abstract base class for most VTK objects
void SetBorderModeToRepeat()
GLsizei GLsizei GLuint * obj
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
GLuint GLuint GLsizei count
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLsizei const GLfloat * value
#define VTK_IMAGE_BORDER_REPEAT
#define VTK_IMAGE_BORDER_CLAMP
GLint GLint GLint GLint GLint GLint y
#define vtkTypeMacro(thisClass, superclass)
void InterpolateIJK(const double point[3], double *value)
vtkInterpolationInfo * InterpolationInfo
GLint GLint GLint GLint GLint x
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
topologically and geometrically regular array of data
abstract superclass for arrays of numeric data
#define VTKIMAGINGCORE_EXPORT
#define vtkGetVector3Macro(name, type)
#define VTK_IMAGE_BORDER_MIRROR
bool CheckBoundsIJK(const double x[3])
#define vtkGetVector6Macro(name, type)
general representation of visualization data
void SetBorderModeToClamp()
void InterpolateRow(vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, double *value, int n)
void SetBorderModeToMirror()