58#ifndef vtkImageReslice_h
59#define vtkImageReslice_h
62#include "vtkImagingCoreModule.h"
66#define VTK_RESLICE_NEAREST VTK_NEAREST_INTERPOLATION
67#define VTK_RESLICE_LINEAR VTK_LINEAR_INTERPOLATION
68#define VTK_RESLICE_CUBIC VTK_CUBIC_INTERPOLATION
113 double y0,
double y1,
double y2,
114 double z0,
double z1,
double z2);
118 this->SetResliceAxesDirectionCosines(x[0], x[1], x[2],
120 z[0], z[1], z[2]); };
122 this->SetResliceAxesDirectionCosines(xyz[0], xyz[1], xyz[2],
123 xyz[3], xyz[4], xyz[5],
124 xyz[6], xyz[7], xyz[8]); };
127 this->GetResliceAxesDirectionCosines(&xyz[0], &xyz[3], &xyz[6]); };
129 this->GetResliceAxesDirectionCosines(this->ResliceAxesDirectionCosines);
130 return this->ResliceAxesDirectionCosines; };
142 this->SetResliceAxesOrigin(xyz[0], xyz[1], xyz[2]); };
145 this->GetResliceAxesOrigin(this->ResliceAxesOrigin);
146 return this->ResliceAxesOrigin; };
187 vtkGetMacro(TransformInputSampling,
int);
198 vtkGetMacro(AutoCropOutput,
int);
206 vtkGetMacro(Wrap,
int);
216 vtkGetMacro(Mirror,
int);
232 vtkGetMacro(Border,
int);
240 vtkSetClampMacro(InterpolationMode,
int,
242 vtkGetMacro(InterpolationMode,
int);
269 vtkGetMacro(SlabMode,
int);
286 vtkGetMacro(SlabNumberOfSlices,
int);
297 vtkGetMacro(SlabTrapezoidIntegration,
int);
311 vtkGetMacro(SlabSliceSpacingFraction,
double);
320 vtkGetMacro(Optimization,
int);
333 vtkGetMacro(ScalarShift,
double);
345 vtkGetMacro(ScalarScale,
double)
360 vtkGetMacro(OutputScalarType,
int);
367 vtkSetVector4Macro(BackgroundColor,
double);
368 vtkGetVector4Macro(BackgroundColor,
double);
375 void SetBackgroundLevel(
double v) { this->SetBackgroundColor(v,v,v,v); };
386 this->SetOutputSpacing(a[0], a[1], a[2]); };
387 vtkGetVector3Macro(OutputSpacing,
double);
398 this->SetOutputOrigin(a[0], a[1], a[2]); };
399 vtkGetVector3Macro(OutputOrigin,
double);
410 this->SetOutputExtent(a[0], a[1], a[2], a[3], a[4], a[5]); };
411 vtkGetVector6Macro(OutputExtent,
int);
427 vtkGetMacro(OutputDimensionality,
int);
450 void SetInterpolate(
int t) {
451 if (t && !this->GetInterpolate()) {
452 this->SetInterpolationModeToLinear(); }
453 else if (!t && this->GetInterpolate()) {
454 this->SetInterpolationModeToNearestNeighbor(); } };
456 this->SetInterpolate(1); };
458 this->SetInterpolate(0); };
479 vtkGetMacro(GenerateStencilOutput,
int);
498 double ResliceAxesDirectionCosines[9];
499 double ResliceAxesOrigin[3];
514 double BackgroundColor[4];
515 double OutputOrigin[3];
516 double OutputSpacing[3];
553 int inputType,
int inputNumComponents,
554 int count,
int idX,
int idY,
int idZ,
558 int inputType,
int inputNumComponents,
559 int count,
int idX,
int idY,
int idZ,
int threadId) {
560 this->ConvertScalars(inPtr, outPtr, inputType, inputNumComponents,
561 count, idX, idY, idZ, threadId); }
576 vtkImageData **outData,
int ext[6],
int id) VTK_OVERRIDE;
583 return this->OptimizedTransform; };
interpolate data values from images
Proxy object to connect input/output ports.
vtkAlgorithmOutput * GetOutputPort()
general representation of visualization data
Detect and break reference loops.
topologically and geometrically regular array of data
Reslices a volume along a new set of axes.
int HasConvertScalars
This should be set to 1 by derived classes that override the ConvertScalars method.
void SetResliceAxesDirectionCosines(const double x[3], const double y[3], const double z[3])
vtkImageStencilData * GetStencil()
virtual void SetOutputOrigin(const double a[3])
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetOutputExtent(int a, int b, int c, int d, int e, int f)
Set the extent for the output data.
void SetResliceAxesDirectionCosines(const double xyz[9])
int GenerateStencilOutput
double * GetResliceAxesOrigin()
void GetAutoCroppedOutputBounds(vtkInformation *inInfo, double bounds[6])
virtual void SetResliceTransform(vtkAbstractTransform *)
Set a transform to be applied to the resampling grid that has been defined via the ResliceAxes and th...
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
virtual const char * GetInterpolationModeAsString()
void SetResliceAxesDirectionCosines(double x0, double x1, double x2, double y0, double y1, double y2, double z0, double z1, double z2)
Specify the direction cosines for the ResliceAxes (i.e.
void SetResliceAxesOrigin(double x, double y, double z)
Specify the origin for the ResliceAxes (i.e.
void SetResliceAxesOrigin(const double xyz[3])
virtual void ConvertScalars(void *inPtr, void *outPtr, int inputType, int inputNumComponents, int count, int idX, int idY, int idZ, int threadId)
This should be overridden by derived classes that operate on the interpolated data before it is place...
void GetResliceAxesDirectionCosines(double xyz[9])
virtual void SetOutputExtent(const int a[6])
virtual void SetOutputOrigin(double x, double y, double z)
Set the origin for the output data.
virtual void AllocateOutputData(vtkImageData *output, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
void SetOutputSpacingToDefault()
void SetStencilOutput(vtkImageStencilData *stencil)
vtkImageStencilData * GetStencilOutput()
virtual vtkAbstractImageInterpolator * GetInterpolator()
void SetInterpolationModeToCubic()
double SlabSliceSpacingFraction
void GetResliceAxesOrigin(double xyz[3])
virtual void SetOutputSpacing(const double a[3])
double GetBackgroundLevel()
virtual int ConvertScalarInfo(int &scalarType, int &numComponents)
This should be overridden by derived classes that operate on the interpolated data before it is place...
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
int TransformInputSampling
virtual int FillOutputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
vtkAbstractTransform * OptimizedTransform
vtkMatrix4x4 * IndexMatrix
vtkMTimeType GetMTime() override
When determining the modified time of the filter, this check the modified time of the transform and m...
vtkMatrix4x4 * ResliceAxes
virtual void SetOutputSpacing(double x, double y, double z)
Set the voxel spacing for the output data.
static vtkImageReslice * New()
void ConvertScalarsBase(void *inPtr, void *outPtr, int inputType, int inputNumComponents, int count, int idX, int idY, int idZ, int threadId)
virtual vtkImageData * AllocateOutputData(vtkDataObject *, vtkInformation *) override
double * GetResliceAxesDirectionCosines()
vtkAbstractTransform * ResliceTransform
virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler)
Set the interpolator to use.
virtual void SetResliceAxes(vtkMatrix4x4 *)
This method is used to set up the axes for the output voxels.
vtkAbstractImageInterpolator * Interpolator
vtkAlgorithmOutput * GetStencilOutputPort()
Get the output stencil.
int SlabTrapezoidIntegration
void SetInterpolationModeToNearestNeighbor()
void SetOutputExtentToDefault()
virtual const char * GetSlabModeAsString()
vtkAbstractTransform * GetOptimizedTransform()
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void GetResliceAxesDirectionCosines(double x[3], double y[3], double z[3])
vtkMatrix4x4 * GetIndexMatrix(vtkInformation *inInfo, vtkInformation *outInfo)
vtkImageData * InformationInput
void SetOutputOriginToDefault()
virtual int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual void SetInformationInput(vtkImageData *)
Set a vtkImageData from which the default Spacing, Origin, and WholeExtent of the output will be copi...
void SetInterpolationModeToLinear()
void SetStencilData(vtkImageStencilData *stencil)
Use a stencil to limit the calculations to a specific region of the output.
efficient description of an image stencil
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
Superclass for mapping scalar values to colors.
Generic filter that has one input.
#define VTK_RESLICE_CUBIC
#define VTK_RESLICE_NEAREST
#define VTK_RESLICE_LINEAR
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_IMAGE_SLAB_MAX
#define VTK_IMAGE_SLAB_MIN
#define VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_MEAN
vtkTypeUInt64 vtkMTimeType