21 #ifndef vtkAbstractImageInterpolator_h
22 #define vtkAbstractImageInterpolator_h
24 #include "vtkImagingCoreModule.h"
35 VTK_ABI_NAMESPACE_BEGIN
56 virtual void ReleaseData();
69 virtual void Update();
78 double Interpolate(
double x,
double y,
double z,
int component);
87 bool Interpolate(
const double point[3],
double*
value);
92 void SetOutValue(
double outValue);
100 void SetTolerance(
double tol);
109 void SetComponentOffset(
int offset);
118 void SetComponentCount(
int count);
125 int ComputeNumberOfComponents(
int inputComponents);
132 int GetNumberOfComponents();
140 void InterpolateIJK(
const double point[3],
double*
value);
141 void InterpolateIJK(
const float point[3],
float*
value);
151 bool CheckBoundsIJK(
const double x[3]);
152 bool CheckBoundsIJK(
const float x[3]);
168 const char* GetBorderModeAsString();
178 void SetSlidingWindow(
bool x);
189 virtual void ComputeSupportSize(
const double matrix[16],
int support[3]) = 0;
197 virtual bool IsSeparable() = 0;
210 virtual void PrecomputeWeightsForExtent(
const double matrix[16],
const int extent[6],
212 virtual void PrecomputeWeightsForExtent(
const float matrix[16],
const int extent[6],
238 vtkGetVector3Macro(Spacing,
double);
245 vtkGetVectorMacro(Direction,
double, 9);
252 vtkGetVector3Macro(Origin,
double);
259 vtkGetVector6Macro(Extent,
int);
269 virtual void InternalUpdate() = 0;
279 void CoordinateToIJK(
const double point[3],
double ijk[3]);
285 virtual void GetInterpolationFunc(
287 virtual void GetInterpolationFunc(
295 virtual void GetRowInterpolationFunc(
297 virtual void GetRowInterpolationFunc(
305 virtual void GetSlidingWindowFunc(
307 virtual void GetSlidingWindowFunc(
312 double StructuredBoundsDouble[6];
313 float StructuredBoundsFloat[6];
317 double InverseDirection[9];
330 void (*InterpolationFuncDouble)(
332 void (*InterpolationFuncFloat)(
335 void (*RowInterpolationFuncDouble)(
337 void (*RowInterpolationFuncFloat)(
358 return !((x[0] < bounds[0]) || (x[0] > bounds[1]) || (x[1] < bounds[2]) || (x[1] > bounds[3]) ||
359 (x[2] < bounds[4]) || (x[2] > bounds[5]));
365 return !((x[0] < bounds[0]) || (x[0] > bounds[1]) || (x[1] < bounds[2]) || (x[1] > bounds[3]) ||
366 (x[2] < bounds[4]) || (x[2] > bounds[5]));
417 VTK_ABI_NAMESPACE_END
interpolate data values from images
vtkImageBorderMode BorderMode
void(* InterpolationFuncDouble)(VTK_FUTURE_CONST vtkInterpolationInfo *info, const double point[3], double *outPtr)
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).
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]
vtkImageBorderMode BorderMode
abstract superclass for arrays of numeric data
vtkImageBorderMode GetBorderMode()
The border mode (default: clamp).
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(* InterpolationFuncFloat)(VTK_FUTURE_CONST vtkInterpolationInfo *info, const float point[3], float *outPtr)
void(* RowInterpolationFuncFloat)(vtkInterpolationWeights *weights, int idX, int idY, int idZ, float *outPtr, int n)
general representation of visualization data
vtkInterpolationWeights(const vtkInterpolationInfo &info)
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).