44 #ifndef vtkImageReslice_h
45 #define vtkImageReslice_h
48 #include "vtkImagingCoreModule.h"
53 #define VTK_RESLICE_NEAREST VTK_NEAREST_INTERPOLATION
54 #define VTK_RESLICE_LINEAR VTK_LINEAR_INTERPOLATION
55 #define VTK_RESLICE_CUBIC VTK_CUBIC_INTERPOLATION
57 VTK_ABI_NAMESPACE_BEGIN
101 void SetResliceAxesDirectionCosines(
double x0,
double x1,
double x2,
double y0,
double y1,
102 double y2,
double z0,
double z1,
double z2);
105 this->SetResliceAxesDirectionCosines(x[0], x[1], x[2], y[0], y[1], y[2], z[0], z[1], z[2]);
109 this->SetResliceAxesDirectionCosines(
110 xyz[0], xyz[1], xyz[2], xyz[3], xyz[4], xyz[5], xyz[6], xyz[7], xyz[8]);
112 void GetResliceAxesDirectionCosines(
double x[3],
double y[3],
double z[3]);
115 this->GetResliceAxesDirectionCosines(&xyz[0], &xyz[3], &xyz[6]);
119 this->GetResliceAxesDirectionCosines(this->ResliceAxesDirectionCosines);
120 return this->ResliceAxesDirectionCosines;
131 void SetResliceAxesOrigin(
double x,
double y,
double z);
134 this->SetResliceAxesOrigin(xyz[0], xyz[1], xyz[2]);
136 void GetResliceAxesOrigin(
double xyz[3]);
139 this->GetResliceAxesOrigin(this->ResliceAxesOrigin);
140 return this->ResliceAxesOrigin;
181 vtkBooleanMacro(TransformInputSampling,
vtkTypeBool);
236 vtkSetMacro(BorderThickness,
double);
238 vtkGetMacro(BorderThickness,
double);
245 vtkGetMacro(InterpolationMode,
int);
249 virtual const char* GetInterpolationModeAsString();
269 vtkGetMacro(SlabMode,
int);
274 virtual const char* GetSlabModeAsString();
281 vtkSetMacro(SlabNumberOfSlices,
int);
282 vtkGetMacro(SlabNumberOfSlices,
int);
291 vtkSetMacro(SlabTrapezoidIntegration,
vtkTypeBool);
292 vtkBooleanMacro(SlabTrapezoidIntegration,
vtkTypeBool);
293 vtkGetMacro(SlabTrapezoidIntegration,
vtkTypeBool);
306 vtkSetMacro(SlabSliceSpacingFraction,
double);
307 vtkGetMacro(SlabSliceSpacingFraction,
double);
328 vtkSetMacro(ScalarShift,
double);
329 vtkGetMacro(ScalarShift,
double);
340 vtkSetMacro(ScalarScale,
double);
341 vtkGetMacro(ScalarScale,
double);
355 vtkSetMacro(OutputScalarType,
int);
356 vtkGetMacro(OutputScalarType,
int);
366 vtkSetVector4Macro(BackgroundColor,
double);
367 vtkGetVector4Macro(BackgroundColor,
double);
383 virtual void SetOutputSpacing(
double x,
double y,
double z);
385 vtkGetVector3Macro(OutputSpacing,
double);
386 void SetOutputSpacingToDefault();
399 virtual void SetOutputDirection(
double xx,
double xy,
double xz,
double yx,
double yy,
double yz,
400 double zx,
double zy,
double zz);
403 this->SetOutputDirection(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
405 vtkGetVector3Macro(OutputDirection,
double);
406 void SetOutputDirectionToDefault();
414 virtual void SetOutputOrigin(
double x,
double y,
double z);
416 vtkGetVector3Macro(OutputOrigin,
double);
417 void SetOutputOriginToDefault();
425 virtual void SetOutputExtent(
int a,
int b,
int c,
int d,
int e,
int f);
428 this->SetOutputExtent(a[0], a[1], a[2], a[3], a[4], a[5]);
430 vtkGetVector6Macro(OutputExtent,
int);
431 void SetOutputExtentToDefault();
445 vtkSetMacro(OutputDimensionality,
int);
446 vtkGetMacro(OutputDimensionality,
int);
471 if (t && !this->GetInterpolate())
473 this->SetInterpolationModeToLinear();
475 else if (!t && this->GetInterpolate())
477 this->SetInterpolationModeToNearestNeighbor();
502 vtkBooleanMacro(GenerateStencilOutput,
vtkTypeBool);
519 double ResliceAxesDirectionCosines[9];
520 double ResliceAxesOrigin[3];
536 double BackgroundColor[4];
537 double OutputDirection[9];
538 double OutputOrigin[3];
539 double OutputSpacing[3];
566 virtual int ConvertScalarInfo(
int& scalarType,
int& numComponents);
576 virtual void ConvertScalars(
577 vtkDataArray* input,
void* outPtr,
int count,
int idX,
int idY,
int idZ,
int threadId);
580 vtkDataArray* input,
void* outPtr,
int count,
int idX,
int idY,
int idZ,
int threadId)
582 this->ConvertScalars(input, outPtr, count, idX, idY, idZ, threadId);
593 virtual
void ConvertScalars(VTK_FUTURE_CONST
void* inPtr,
void* outPtr,
int inputType,
594 int inputNumComponents,
int count,
int idX,
int idY,
int idZ,
int threadId);
596 void ConvertScalarsBase(VTK_FUTURE_CONST
void* inPtr,
void* outPtr,
int inputType,
597 int inputNumComponents,
int count,
int idX,
int idY,
int idZ,
int threadId);
606 void GetAutoCroppedOutputBounds(
607 vtkInformation* inInfo, const
double outDirection[9],
double bounds[6]);
608 void AllocateOutputData(
611 int RequestInformation(
vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
612 int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
613 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
614 void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
616 VTK_FUTURE_CONST
int ext[6],
int id) override;
617 int FillInputPortInformation(
int port, vtkInformation*
info) override;
618 int FillOutputPortInformation(
int port, vtkInformation*
info) override;
620 vtkMatrix4x4* GetIndexMatrix(vtkInformation* inInfo, vtkInformation* outInfo);
628 VTK_ABI_NAMESPACE_END
vtkTypeBool AutoCropOutput
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
vtkTypeBool GetInterpolate()
Convenient methods for switching between nearest-neighbor and linear interpolation.
#define VTK_RESLICE_CUBIC
vtkTypeUInt32 vtkMTimeType
void SetSlabModeToMax()
Set the slab mode, for generating thick slices.
vtkMatrix4x4 * IndexMatrix
#define VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_MEAN
vtkTypeBool GenerateStencilOutput
void ReportReferences(vtkGarbageCollector *) override
void SetInterpolationModeToLinear()
void SetInterpolationModeToCubic()
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.
vtkTypeBool ComputeOutputExtent
#define VTK_RESLICE_LINEAR
virtual void SetOutputDirection(const double a[9])
Set the direction for the output data.
vtkTypeBool UsePermuteExecute
Detect and break reference loops.
vtkTypeBool ComputeOutputOrigin
Proxy object to connect input/output ports.
void SetSlabModeToSum()
Set the slab mode, for generating thick slices.
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
vtkAbstractTransform * OptimizedTransform
topologically and geometrically regular array of data
abstract superclass for arrays of numeric data
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTypeBool HasConvertScalars
This should be set to 1 by derived classes that override the ConvertScalars method.
vtkTypeBool ComputeOutputSpacing
vtkTypeBool SlabTrapezoidIntegration
void ConvertScalarsBase(vtkDataArray *input, void *outPtr, int count, int idX, int idY, int idZ, int threadId)
double GetBackgroundLevel()
Set background grey level (for single-component images).
vtkTypeBool HitInputExtent
virtual void SetOutputExtent(const int a[6])
Set the extent for the output data.
vtkImageData * InformationInput
#define VTK_SIZEHINT(...)
void SetInterpolate(vtkTypeBool t)
Convenient methods for switching between nearest-neighbor and linear interpolation.
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.
vtkTypeBool TransformInputSampling
void SetBackgroundLevel(double v)
Set background grey level (for single-component images).
vtkMatrix4x4 * ResliceAxes
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.
general representation of visualization data
#define VTK_DEPRECATED_IN_9_7_0(reason)
void SetInterpolationModeToNearestNeighbor()
vtkAbstractImageInterpolator * Interpolator
virtual void SetOutputOrigin(const double a[3])
Set the origin for the output data.
bool PassDirectionToOutput
vtkAbstractTransform * ResliceTransform
void SetSlabModeToMin()
Set the slab mode, for generating thick slices.
double SlabSliceSpacingFraction
void SetResliceAxesOrigin(const double xyz[3])
Specify the origin for the ResliceAxes (i.e.