VTK  9.2.5
vtkImageResize.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageResize.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
37#ifndef vtkImageResize_h
38#define vtkImageResize_h
39
40#include "vtkImagingCoreModule.h" // For export macro
42
44
45class VTKIMAGINGCORE_EXPORT vtkImageResize : public vtkThreadedImageAlgorithm
46{
47public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
52 enum
53 {
56 MAGNIFICATION_FACTORS
57 };
58
60
66 vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
67 vtkGetMacro(ResizeMethod, int);
68 void SetResizeMethodToOutputDimensions() { this->SetResizeMethod(OUTPUT_DIMENSIONS); }
69 void SetResizeMethodToOutputSpacing() { this->SetResizeMethod(OUTPUT_SPACING); }
70 void SetResizeMethodToMagnificationFactors() { this->SetResizeMethod(MAGNIFICATION_FACTORS); }
71 virtual const char* GetResizeMethodAsString();
73
75
80 vtkSetVector3Macro(OutputDimensions, int);
81 vtkGetVector3Macro(OutputDimensions, int);
83
85
90 vtkSetVector3Macro(OutputSpacing, double);
91 vtkGetVector3Macro(OutputSpacing, double);
93
95
100 vtkSetVector3Macro(MagnificationFactors, double);
101 vtkGetVector3Macro(MagnificationFactors, double);
103
105
114 vtkSetMacro(Border, vtkTypeBool);
115 vtkBooleanMacro(Border, vtkTypeBool);
116 vtkGetMacro(Border, vtkTypeBool);
118
120
124 vtkSetMacro(Cropping, vtkTypeBool);
125 vtkBooleanMacro(Cropping, vtkTypeBool);
126 vtkGetMacro(Cropping, vtkTypeBool);
128
130
135 vtkSetVector6Macro(CroppingRegion, double);
136 vtkGetVector6Macro(CroppingRegion, double);
138
140
143 vtkSetMacro(Interpolate, vtkTypeBool);
144 vtkBooleanMacro(Interpolate, vtkTypeBool);
145 vtkGetMacro(Interpolate, vtkTypeBool);
147
149
155
160
161protected:
163 ~vtkImageResize() override;
164
166
171 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
172 int id) override;
173
175 int OutputDimensions[3];
176 double OutputSpacing[3];
177 double MagnificationFactors[3];
180 double CroppingRegion[6];
181
182 double IndexStretch[3];
183 double IndexTranslate[3];
184
188
189private:
190 vtkImageResize(const vtkImageResize&) = delete;
191 void operator=(const vtkImageResize&) = delete;
192};
193
194#endif
interpolate data values from images
topologically and geometrically regular array of data
Definition: vtkImageData.h:54
High-quality image resizing filter.
vtkTypeBool Border
virtual vtkAbstractImageInterpolator * GetInterpolator()
Set the interpolator for resampling the data.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkTypeBool Interpolate
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,...
vtkMTimeType GetMTime() override
Get the modified time of the filter.
vtkAbstractImageInterpolator * NNInterpolator
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkAbstractImageInterpolator * Interpolator
void SetResizeMethodToOutputDimensions()
The resizing method to use.
void SetResizeMethodToMagnificationFactors()
The resizing method to use.
~vtkImageResize() override
virtual const char * GetResizeMethodAsString()
The resizing method to use.
static vtkImageResize * New()
virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler)
Set the interpolator for resampling the data.
virtual vtkAbstractImageInterpolator * GetInternalInterpolator()
void SetResizeMethodToOutputSpacing()
The resizing method to use.
vtkTypeBool Cropping
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287