30 #ifndef __vtkGridTransform_h
31 #define __vtkGridTransform_h
33 #include "vtkFiltersHybridModule.h"
34 #include "vtkWarpTransform.h"
36 class vtkAlgorithmOutput;
37 class vtkGridTransformConnectionHolder;
40 #define VTK_GRID_NEAREST VTK_NEAREST_INTERPOLATION
41 #define VTK_GRID_LINEAR VTK_LINEAR_INTERPOLATION
42 #define VTK_GRID_CUBIC VTK_CUBIC_INTERPOLATION
49 virtual void PrintSelf(ostream& os, vtkIndent indent);
57 virtual void SetDisplacementGridConnection(vtkAlgorithmOutput*);
58 virtual void SetDisplacementGridData(vtkImageData*);
59 virtual vtkImageData* GetDisplacementGrid();
65 vtkSetMacro(DisplacementScale,
double);
66 vtkGetMacro(DisplacementScale,
double);
72 vtkSetMacro(DisplacementShift,
double);
73 vtkGetMacro(DisplacementShift,
double);
79 void SetInterpolationMode(
int mode);
80 vtkGetMacro(InterpolationMode,
int);
82 { this->SetInterpolationMode(VTK_NEAREST_INTERPOLATION); };
84 { this->SetInterpolationMode(VTK_LINEAR_INTERPOLATION); };
86 { this->SetInterpolationMode(VTK_CUBIC_INTERPOLATION); };
87 const char *GetInterpolationModeAsString();
91 vtkAbstractTransform *MakeTransform();
94 unsigned long GetMTime();
101 void InternalUpdate();
104 void InternalDeepCopy(vtkAbstractTransform *transform);
108 void ForwardTransformPoint(
const float in[3],
float out[3]);
109 void ForwardTransformPoint(
const double in[3],
double out[3]);
112 void ForwardTransformDerivative(
const float in[3],
float out[3],
113 float derivative[3][3]);
114 void ForwardTransformDerivative(
const double in[3],
double out[3],
115 double derivative[3][3]);
117 void InverseTransformPoint(
const float in[3],
float out[3]);
118 void InverseTransformPoint(
const double in[3],
double out[3]);
120 void InverseTransformDerivative(
const float in[3],
float out[3],
121 float derivative[3][3]);
122 void InverseTransformDerivative(
const double in[3],
double out[3],
123 double derivative[3][3]);
126 void (*InterpolationFunction)(
double point[3],
double displacement[3],
127 double derivatives[3][3],
128 void *gridPtr,
int gridType,
129 int inExt[6], vtkIdType inInc[3]);
137 double GridSpacing[3];
138 double GridOrigin[3];
140 vtkIdType GridIncrements[3];
146 vtkGridTransformConnectionHolder* ConnectionHolder;
157 return "NearestNeighbor";