52 #ifndef vtkImageReslice_h
53 #define vtkImageReslice_h
56 #include "vtkImagingCoreModule.h"
60 #define VTK_RESLICE_NEAREST VTK_NEAREST_INTERPOLATION
61 #define VTK_RESLICE_LINEAR VTK_LINEAR_INTERPOLATION
62 #define VTK_RESLICE_CUBIC VTK_CUBIC_INTERPOLATION
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; };
134 void SetResliceAxesOrigin(
double x,
double y,
double z);
136 this->SetResliceAxesOrigin(xyz[0], xyz[1], xyz[2]); };
137 void GetResliceAxesOrigin(
double xyz[3]);
139 this->GetResliceAxesOrigin(this->ResliceAxesOrigin);
140 return this->ResliceAxesOrigin; };
181 vtkGetMacro(TransformInputSampling,
int);
192 vtkGetMacro(AutoCropOutput,
int);
200 vtkGetMacro(Wrap,
int);
210 vtkGetMacro(Mirror,
int);
226 vtkGetMacro(Border,
int);
234 vtkSetClampMacro(InterpolationMode,
int,
236 vtkGetMacro(InterpolationMode,
int);
243 virtual const char *GetInterpolationModeAsString();
263 vtkGetMacro(SlabMode,
int);
272 virtual const char *GetSlabModeAsString();
280 vtkGetMacro(SlabNumberOfSlices,
int);
291 vtkGetMacro(SlabTrapezoidIntegration,
int);
305 vtkGetMacro(SlabSliceSpacingFraction,
double);
314 vtkGetMacro(Optimization,
int);
327 vtkGetMacro(ScalarShift,
double);
339 vtkGetMacro(ScalarScale,
double)
354 vtkGetMacro(OutputScalarType,
int);
361 vtkSetVector4Macro(BackgroundColor,
double);
362 vtkGetVector4Macro(BackgroundColor,
double);
369 void SetBackgroundLevel(
double v) { this->SetBackgroundColor(v,v,v,v); };
378 virtual void SetOutputSpacing(
double x,
double y,
double z);
380 this->SetOutputSpacing(a[0], a[1], a[2]); };
381 vtkGetVector3Macro(OutputSpacing,
double);
382 void SetOutputSpacingToDefault();
390 virtual void SetOutputOrigin(
double x,
double y,
double z);
392 this->SetOutputOrigin(a[0], a[1], a[2]); };
393 vtkGetVector3Macro(OutputOrigin,
double);
394 void SetOutputOriginToDefault();
402 virtual void SetOutputExtent(
int a,
int b,
int c,
int d,
int e,
int f);
404 this->SetOutputExtent(a[0], a[1], a[2], a[3], a[4], a[5]); };
405 vtkGetVector6Macro(OutputExtent,
int);
406 void SetOutputExtentToDefault();
421 vtkGetMacro(OutputDimensionality,
int);
444 void SetInterpolate(
int t) {
445 if (t && !this->GetInterpolate()) {
446 this->SetInterpolationModeToLinear(); }
447 else if (!t && this->GetInterpolate()) {
448 this->SetInterpolationModeToNearestNeighbor(); } };
450 this->SetInterpolate(1); };
452 this->SetInterpolate(0); };
473 vtkGetMacro(GenerateStencilOutput,
int);
492 double ResliceAxesDirectionCosines[9];
493 double ResliceAxesOrigin[3];
500 int InterpolationMode;
503 int SlabNumberOfSlices;
504 int SlabTrapezoidIntegration;
505 double SlabSliceSpacingFraction;
508 double BackgroundColor[4];
509 double OutputOrigin[3];
510 double OutputSpacing[3];
512 int OutputScalarType;
513 int OutputDimensionality;
514 int TransformInputSampling;
517 int UsePermuteExecute;
518 int ComputeOutputSpacing;
519 int ComputeOutputOrigin;
520 int ComputeOutputExtent;
521 int GenerateStencilOutput;
530 int HasConvertScalars;
536 virtual
int ConvertScalarInfo(
int &scalarType,
int &numComponents);
546 virtual
void ConvertScalars(
void *inPtr,
void *outPtr,
547 int inputType,
int inputNumComponents,
548 int count,
int idX,
int idY,
int idZ,
551 void ConvertScalarsBase(
void *inPtr,
void *outPtr,
552 int inputType,
int inputNumComponents,
553 int count,
int idX,
int idY,
int idZ,
int threadId) {
554 this->ConvertScalars(inPtr, outPtr, inputType, inputNumComponents,
555 count, idX, idY, idZ, threadId); }
557 void GetAutoCroppedOutputBounds(
vtkInformation *inInfo,
double bounds[6]);
561 vtkInformationVector *) VTK_OVERRIDE;
562 int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
563 vtkInformationVector *) VTK_OVERRIDE;
564 int RequestData(vtkInformation *, vtkInformationVector **,
565 vtkInformationVector *) VTK_OVERRIDE;
566 void ThreadedRequestData(vtkInformation *request,
567 vtkInformationVector **inputVector,
568 vtkInformationVector *outputVector,
570 vtkImageData **outData,
int ext[6],
int id) VTK_OVERRIDE;
571 int FillInputPortInformation(
int port, vtkInformation *
info) VTK_OVERRIDE;
572 int FillOutputPortInformation(
int port, vtkInformation *
info) VTK_OVERRIDE;
575 vtkInformation *outInfo);
577 return this->OptimizedTransform; };
double * GetResliceAxesDirectionCosines()
Specify the direction cosines for the ResliceAxes (i.e.
interpolate data values from images
#define VTK_IMAGE_SLAB_MAX
#define VTK_RESLICE_NEAREST
vtkAlgorithmOutput * GetOutputPort()
represent and manipulate 4x4 transformation matrices
#define VTK_IMAGE_SLAB_MIN
#define VTK_RESLICE_CUBIC
vtkTypeUInt32 vtkMTimeType
void SetSlabModeToMax()
Set the slab mode, for generating thick slices.
#define VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_MEAN
void SetInterpolationModeToLinear()
Set interpolation mode (default: nearest neighbor).
void SetInterpolationModeToCubic()
Set interpolation mode (default: nearest neighbor).
void InterpolateOn()
Convenient methods for switching between nearest-neighbor and linear interpolation.
vtkAlgorithmOutput * GetStencilOutputPort()
Get the output stencil.
double * GetResliceAxesOrigin()
Specify the origin for the ResliceAxes (i.e.
void SetSlabModeToMean()
Set the slab mode, for generating thick slices.
#define VTK_RESLICE_LINEAR
Detect and break reference loops.
Proxy object to connect input/output ports.
void SetSlabModeToSum()
Set the slab mode, for generating thick slices.
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Allocate the output data.
Superclass for mapping scalar values to colors.
Generic filter that has one input.
a simple class to control print indentation
efficient description of an image stencil
topologically and geometrically regular array of data
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double GetBackgroundLevel()
Set background grey level (for single-component images).
virtual void SetOutputExtent(const int a[6])
Set the extent for the output data.
Reslices a volume along a new set of axes.
void SetResliceAxesDirectionCosines(const double x[3], const double y[3], const double z[3])
Specify the direction cosines for the ResliceAxes (i.e.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void InterpolateOff()
Convenient methods for switching between nearest-neighbor and linear interpolation.
void GetResliceAxesDirectionCosines(double xyz[9])
Specify the direction cosines for the ResliceAxes (i.e.
void SetResliceAxesDirectionCosines(const double xyz[9])
Specify the direction cosines for the ResliceAxes (i.e.
virtual void SetOutputSpacing(const double a[3])
Set the voxel spacing for the output data.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int GetInterpolate()
Convenient methods for switching between nearest-neighbor and linear interpolation.
general representation of visualization data
void SetInterpolationModeToNearestNeighbor()
Set interpolation mode (default: nearest neighbor).
virtual void SetOutputOrigin(const double a[3])
Set the origin for the output data.
void SetSlabModeToMin()
Set the slab mode, for generating thick slices.
void SetResliceAxesOrigin(const double xyz[3])
Specify the origin for the ResliceAxes (i.e.