 |
VTK
9.0.1
|
Go to the documentation of this file.
52 #ifndef vtkImageReslice_h
53 #define vtkImageReslice_h
55 #include "vtkImagingCoreModule.h"
59 #define VTK_RESLICE_NEAREST VTK_NEAREST_INTERPOLATION
60 #define VTK_RESLICE_LINEAR VTK_LINEAR_INTERPOLATION
61 #define VTK_RESLICE_CUBIC VTK_CUBIC_INTERPOLATION
106 double y2,
double z0,
double z1,
double z2);
109 this->SetResliceAxesDirectionCosines(x[0], x[1], x[2], y[0], y[1], y[2], z[0], z[1], z[2]);
113 this->SetResliceAxesDirectionCosines(
114 xyz[0], xyz[1], xyz[2], xyz[3], xyz[4], xyz[5], xyz[6], xyz[7], xyz[8]);
119 this->GetResliceAxesDirectionCosines(&xyz[0], &xyz[3], &xyz[6]);
123 this->GetResliceAxesDirectionCosines(this->ResliceAxesDirectionCosines);
124 return this->ResliceAxesDirectionCosines;
138 this->SetResliceAxesOrigin(xyz[0], xyz[1], xyz[2]);
143 this->GetResliceAxesOrigin(this->ResliceAxesOrigin);
144 return this->ResliceAxesOrigin;
241 vtkSetMacro(BorderThickness,
double);
242 vtkGetMacro(BorderThickness,
double);
249 vtkGetMacro(InterpolationMode,
int);
273 vtkGetMacro(SlabMode,
int);
285 vtkSetMacro(SlabNumberOfSlices,
int);
286 vtkGetMacro(SlabNumberOfSlices,
int);
310 vtkSetMacro(SlabSliceSpacingFraction,
double);
311 vtkGetMacro(SlabSliceSpacingFraction,
double);
332 vtkSetMacro(ScalarShift,
double);
333 vtkGetMacro(ScalarShift,
double);
344 vtkSetMacro(ScalarScale,
double);
345 vtkGetMacro(ScalarScale,
double);
359 vtkSetMacro(OutputScalarType,
int);
360 vtkGetMacro(OutputScalarType,
int);
367 vtkSetVector4Macro(BackgroundColor,
double);
368 vtkGetVector4Macro(BackgroundColor,
double);
386 vtkGetVector3Macro(OutputSpacing,
double);
397 vtkGetVector3Macro(OutputOrigin,
double);
409 this->SetOutputExtent(a[0], a[1], a[2], a[3], a[4], a[5]);
411 vtkGetVector6Macro(OutputExtent,
int);
426 vtkSetMacro(OutputDimensionality,
int);
427 vtkGetMacro(OutputDimensionality,
int);
452 if (t && !this->GetInterpolate())
454 this->SetInterpolationModeToLinear();
456 else if (!t && this->GetInterpolate())
458 this->SetInterpolationModeToNearestNeighbor();
500 double ResliceAxesDirectionCosines[9];
501 double ResliceAxesOrigin[3];
517 double BackgroundColor[4];
518 double OutputOrigin[3];
519 double OutputSpacing[3];
555 virtual void ConvertScalars(
void* inPtr,
void* outPtr,
int inputType,
int inputNumComponents,
556 int count,
int idX,
int idY,
int idZ,
int threadId);
559 int count,
int idX,
int idY,
int idZ,
int threadId)
561 this->ConvertScalars(
562 inPtr, outPtr, inputType, inputNumComponents, count, idX, idY, idZ, threadId);
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageData * InformationInput
vtkAlgorithmOutput * GetStencilOutputPort()
Get the output stencil.
vtkMatrix4x4 * ResliceAxes
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkMatrix4x4 * IndexMatrix
virtual void SetResliceAxes(vtkMatrix4x4 *)
This method is used to set up the axes for the output voxels.
void SetOutputOriginToDefault()
virtual void SetInformationInput(vtkImageData *)
Set a vtkImageData from which the default Spacing, Origin, and WholeExtent of the output will be copi...
vtkMTimeType GetMTime() override
When determining the modified time of the filter, this check the modified time of the transform and m...
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,...
void SetResliceAxesOrigin(double x, double y, double z)
Specify the origin for the ResliceAxes (i.e.
void SetInterpolationModeToLinear()
void SetResliceAxesOrigin(const double xyz[3])
#define VTK_IMAGE_SLAB_MAX
vtkAlgorithmOutput * GetOutputPort()
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 SetInterpolate(int t)
Convenient methods for switching between nearest-neighbor and linear interpolation.
static vtkImageReslice * New()
void ReportReferences(vtkGarbageCollector *) override
Report object referenced by instances of this class.
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])
virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler)
Set the interpolator to use.
double * GetResliceAxesDirectionCosines()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkTypeBool SlabTrapezoidIntegration
Generic filter that has one input.
void SetResliceAxesDirectionCosines(const double x[3], const double y[3], const double z[3])
vtkImageStencilData * GetStencil()
virtual vtkAbstractImageInterpolator * GetInterpolator()
void AllocateOutputData(vtkImageData *output, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
virtual void SetOutputOrigin(double x, double y, double z)
Set the origin for the output data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_IMAGE_SLAB_MEAN
void SetInterpolationModeToCubic()
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 void SetOutputExtent(const int a[6])
#define VTK_SIZEHINT(...)
#define VTK_RESLICE_CUBIC
#define VTK_IMAGE_SLAB_MIN
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...
virtual void SetOutputSpacing(double x, double y, double z)
Set the voxel spacing for the output data.
vtkTypeBool GenerateStencilOutput
void GetResliceAxesDirectionCosines(double x[3], double y[3], double z[3])
void GetResliceAxesDirectionCosines(double xyz[9])
virtual void SetResliceTransform(vtkAbstractTransform *)
Set a transform to be applied to the resampling grid that has been defined via the ResliceAxes and th...
topologically and geometrically regular array of data
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
vtkImageData * AllocateOutputData(vtkDataObject *, vtkInformation *) override
vtkAbstractImageInterpolator * Interpolator
double SlabSliceSpacingFraction
Reslices a volume along a new set of axes.
double GetBackgroundLevel()
vtkTypeBool AutoCropOutput
void GetAutoCroppedOutputBounds(vtkInformation *inInfo, double bounds[6])
#define VTK_RESLICE_NEAREST
virtual void SetOutputSpacing(const double a[3])
Superclass for mapping scalar values to colors.
vtkAbstractTransform * OptimizedTransform
void SetStencilData(vtkImageStencilData *stencil)
Use a stencil to limit the calculations to a specific region of the output.
Detect and break reference loops.
void SetInterpolationModeToNearestNeighbor()
int HasConvertScalars
This should be set to 1 by derived classes that override the ConvertScalars method.
void SetOutputExtentToDefault()
virtual const char * GetSlabModeAsString()
void GetResliceAxesOrigin(double xyz[3])
#define VTK_IMAGE_SLAB_SUM
void ConvertScalarsBase(void *inPtr, void *outPtr, int inputType, int inputNumComponents, int count, int idX, int idY, int idZ, int threadId)
Proxy object to connect input/output ports.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
#define VTK_RESLICE_LINEAR
vtkImageStencilData * GetStencilOutput()
efficient description of an image stencil
void SetBackgroundLevel(double v)
Set background grey level (for single-component images).
void SetStencilOutput(vtkImageStencilData *stencil)
virtual void SetOutputOrigin(const double a[3])
virtual const char * GetInterpolationModeAsString()
~vtkImageReslice() override
interpolate data values from images
general representation of visualization data
double * GetResliceAxesOrigin()
int FillOutputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetOutputSpacingToDefault()
vtkAbstractTransform * ResliceTransform
vtkAbstractTransform * GetOptimizedTransform()
vtkTypeUInt32 vtkMTimeType
vtkMatrix4x4 * GetIndexMatrix(vtkInformation *inInfo, vtkInformation *outInfo)
vtkTypeBool TransformInputSampling