57 #ifndef __vtkImageReslice_h
58 #define __vtkImageReslice_h
61 #include "vtkImagingCoreModule.h"
62 #include "vtkThreadedImageAlgorithm.h"
65 #define VTK_RESLICE_NEAREST VTK_NEAREST_INTERPOLATION
66 #define VTK_RESLICE_LINEAR VTK_LINEAR_INTERPOLATION
67 #define VTK_RESLICE_CUBIC VTK_CUBIC_INTERPOLATION
70 class vtkAbstractTransform;
73 class vtkScalarsToColors;
82 virtual void PrintSelf(ostream& os, vtkIndent indent);
97 virtual void SetResliceAxes(vtkMatrix4x4*);
98 vtkGetObjectMacro(ResliceAxes, vtkMatrix4x4);
106 void SetResliceAxesDirectionCosines(
double x0,
double x1,
double x2,
107 double y0,
double y1,
double y2,
108 double z0,
double z1,
double z2);
112 this->SetResliceAxesDirectionCosines(x[0], x[1], x[2],
114 z[0], z[1], z[2]); };
116 this->SetResliceAxesDirectionCosines(xyz[0], xyz[1], xyz[2],
117 xyz[3], xyz[4], xyz[5],
118 xyz[6], xyz[7], xyz[8]); };
119 void GetResliceAxesDirectionCosines(
double x[3],
double y[3],
double z[3]);
121 this->GetResliceAxesDirectionCosines(&xyz[0], &xyz[3], &xyz[6]); };
123 this->GetResliceAxesDirectionCosines(this->ResliceAxesDirectionCosines);
124 return this->ResliceAxesDirectionCosines; };
131 void SetResliceAxesOrigin(
double x,
double y,
double z);
133 this->SetResliceAxesOrigin(xyz[0], xyz[1], xyz[2]); };
134 void GetResliceAxesOrigin(
double xyz[3]);
136 this->GetResliceAxesOrigin(this->ResliceAxesOrigin);
137 return this->ResliceAxesOrigin; };
148 virtual void SetResliceTransform(vtkAbstractTransform*);
149 vtkGetObjectMacro(ResliceTransform, vtkAbstractTransform);
159 virtual void SetInformationInput(vtkImageData*);
160 vtkGetObjectMacro(InformationInput, vtkImageData);
168 vtkSetMacro(TransformInputSampling,
int);
169 vtkBooleanMacro(TransformInputSampling,
int);
170 vtkGetMacro(TransformInputSampling,
int);
177 vtkSetMacro(AutoCropOutput,
int);
178 vtkBooleanMacro(AutoCropOutput,
int);
179 vtkGetMacro(AutoCropOutput,
int);
184 vtkSetMacro(Wrap,
int);
185 vtkGetMacro(Wrap,
int);
186 vtkBooleanMacro(Wrap,
int);
192 vtkSetMacro(Mirror,
int);
193 vtkGetMacro(Mirror,
int);
194 vtkBooleanMacro(Mirror,
int);
205 vtkSetMacro(Border,
int);
206 vtkGetMacro(Border,
int);
207 vtkBooleanMacro(Border,
int);
212 vtkSetClampMacro(InterpolationMode,
int,
214 vtkGetMacro(InterpolationMode,
int);
221 virtual const char *GetInterpolationModeAsString();
233 vtkSetClampMacro(SlabMode,
int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_SUM);
234 vtkGetMacro(SlabMode,
int);
236 this->SetSlabMode(VTK_IMAGE_SLAB_MIN); };
238 this->SetSlabMode(VTK_IMAGE_SLAB_MAX); };
240 this->SetSlabMode(VTK_IMAGE_SLAB_MEAN); };
242 this->SetSlabMode(VTK_IMAGE_SLAB_SUM); };
243 virtual const char *GetSlabModeAsString();
248 vtkSetMacro(SlabNumberOfSlices,
int);
249 vtkGetMacro(SlabNumberOfSlices,
int);
256 vtkSetMacro(SlabTrapezoidIntegration,
int);
257 vtkBooleanMacro(SlabTrapezoidIntegration,
int);
258 vtkGetMacro(SlabTrapezoidIntegration,
int);
264 vtkSetMacro(Optimization,
int);
265 vtkGetMacro(Optimization,
int);
266 vtkBooleanMacro(Optimization,
int);
271 vtkSetVector4Macro(BackgroundColor,
double);
272 vtkGetVector4Macro(BackgroundColor,
double);
284 virtual void SetOutputSpacing(
double x,
double y,
double z);
286 this->SetOutputSpacing(a[0], a[1], a[2]); };
287 vtkGetVector3Macro(OutputSpacing,
double);
288 void SetOutputSpacingToDefault();
294 virtual void SetOutputOrigin(
double x,
double y,
double z);
296 this->SetOutputOrigin(a[0], a[1], a[2]); };
297 vtkGetVector3Macro(OutputOrigin,
double);
298 void SetOutputOriginToDefault();
304 virtual void SetOutputExtent(
int a,
int b,
int c,
int d,
int e,
int f);
306 this->SetOutputExtent(a[0], a[1], a[2], a[3], a[4], a[5]); };
307 vtkGetVector6Macro(OutputExtent,
int);
308 void SetOutputExtentToDefault();
318 vtkSetMacro(OutputDimensionality,
int);
319 vtkGetMacro(OutputDimensionality,
int);
324 unsigned long int GetMTime();
327 virtual void ReportReferences(vtkGarbageCollector*);
336 if (t && !this->GetInterpolate()) {
337 this->SetInterpolationModeToLinear(); }
338 else if (!t && this->GetInterpolate()) {
339 this->SetInterpolationModeToNearestNeighbor(); } };
341 this->SetInterpolate(1); };
343 this->SetInterpolate(0); };
359 vtkSetMacro(GenerateStencilOutput,
int);
360 vtkGetMacro(GenerateStencilOutput,
int);
361 vtkBooleanMacro(GenerateStencilOutput,
int);
367 return this->GetOutputPort(1); }
377 double ResliceAxesDirectionCosines[9];
378 double ResliceAxesOrigin[3];
390 double BackgroundColor[4];
391 double OutputOrigin[3];
392 double OutputSpacing[3];
414 virtual int ConvertScalarInfo(
int &scalarType,
int &numComponents);
423 virtual void ConvertScalars(
void *inPtr,
void *outPtr,
424 int inputType,
int inputNumComponents,
425 int count,
int idX,
int idY,
int idZ,
430 int inputType,
int inputNumComponents,
431 int count,
int idX,
int idY,
int idZ,
int threadId) {
432 this->ConvertScalars(inPtr, outPtr, inputType, inputNumComponents,
433 count, idX, idY, idZ, threadId); }
435 void GetAutoCroppedOutputBounds(vtkInformation *inInfo,
double bounds[6]);
436 virtual void AllocateOutputData(vtkImageData *output, vtkInformation *outInfo,
int *uExtent);
437 virtual vtkImageData *AllocateOutputData(vtkDataObject *, vtkInformation *);
438 virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
439 vtkInformationVector *);
440 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
441 vtkInformationVector *);
442 virtual int RequestData(vtkInformation *, vtkInformationVector **,
443 vtkInformationVector *);
444 virtual void ThreadedRequestData(vtkInformation *request,
445 vtkInformationVector **inputVector,
446 vtkInformationVector *outputVector,
447 vtkImageData ***inData,
448 vtkImageData **outData,
int ext[6],
int id);
449 virtual int FillInputPortInformation(
int port, vtkInformation *info);
450 virtual int FillOutputPortInformation(
int port, vtkInformation *info);
452 vtkMatrix4x4 *GetIndexMatrix(vtkInformation *inInfo,
453 vtkInformation *outInfo);
455 return this->OptimizedTransform; };
double * GetResliceAxesDirectionCosines()
interpolate data values from images
#define VTK_RESLICE_NEAREST
vtkAbstractTransform * GetOptimizedTransform()
#define VTK_RESLICE_CUBIC
vtkMatrix4x4 * IndexMatrix
int GenerateStencilOutput
void SetInterpolationModeToLinear()
void SetInterpolationModeToCubic()
vtkAlgorithmOutput * GetStencilOutputPort()
double * GetResliceAxesOrigin()
#define VTK_RESLICE_LINEAR
int TransformInputSampling
efficient description of an image stencil
void ConvertScalarsBase(void *inPtr, void *outPtr, int inputType, int inputNumComponents, int count, int idX, int idY, int idZ, int threadId)
vtkAbstractTransform * OptimizedTransform
double GetBackgroundLevel()
virtual void SetOutputExtent(const int a[6])
vtkImageData * InformationInput
Reslices a volume along a new set of axes.
void SetResliceAxesDirectionCosines(const double x[3], const double y[3], const double z[3])
int SlabTrapezoidIntegration
void SetBackgroundLevel(double v)
void SetInterpolate(int t)
vtkMatrix4x4 * ResliceAxes
void GetResliceAxesDirectionCosines(double xyz[9])
void SetResliceAxesDirectionCosines(const double xyz[9])
virtual void SetOutputSpacing(const double a[3])
void SetInterpolationModeToNearestNeighbor()
vtkAbstractImageInterpolator * Interpolator
virtual void SetOutputOrigin(const double a[3])
vtkAbstractTransform * ResliceTransform
void SetResliceAxesOrigin(const double xyz[3])