VTK  9.2.6
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=========================================================================*/
46#ifndef vtkImageResize_h
47#define vtkImageResize_h
48
49#include "vtkImagingCoreModule.h" // For export macro
51
53
54class VTKIMAGINGCORE_EXPORT vtkImageResize : public vtkThreadedImageAlgorithm
55{
56public:
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
61 enum
62 {
65 MAGNIFICATION_FACTORS
66 };
67
69
75 vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
76 vtkGetMacro(ResizeMethod, int);
77 void SetResizeMethodToOutputDimensions() { this->SetResizeMethod(OUTPUT_DIMENSIONS); }
78 void SetResizeMethodToOutputSpacing() { this->SetResizeMethod(OUTPUT_SPACING); }
79 void SetResizeMethodToMagnificationFactors() { this->SetResizeMethod(MAGNIFICATION_FACTORS); }
80 virtual const char* GetResizeMethodAsString();
82
84
89 vtkSetVector3Macro(OutputDimensions, int);
90 vtkGetVector3Macro(OutputDimensions, int);
92
94
99 vtkSetVector3Macro(OutputSpacing, double);
100 vtkGetVector3Macro(OutputSpacing, double);
102
104
109 vtkSetVector3Macro(MagnificationFactors, double);
110 vtkGetVector3Macro(MagnificationFactors, double);
112
114
123 vtkSetMacro(Border, vtkTypeBool);
124 vtkBooleanMacro(Border, vtkTypeBool);
125 vtkGetMacro(Border, vtkTypeBool);
127
129
133 vtkSetMacro(Cropping, vtkTypeBool);
134 vtkBooleanMacro(Cropping, vtkTypeBool);
135 vtkGetMacro(Cropping, vtkTypeBool);
137
139
144 vtkSetVector6Macro(CroppingRegion, double);
145 vtkGetVector6Macro(CroppingRegion, double);
147
149
152 vtkSetMacro(Interpolate, vtkTypeBool);
153 vtkBooleanMacro(Interpolate, vtkTypeBool);
154 vtkGetMacro(Interpolate, vtkTypeBool);
156
158
164
169
170protected:
172 ~vtkImageResize() override;
173
175
180 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
181 int id) override;
182
184 int OutputDimensions[3];
185 double OutputSpacing[3];
186 double MagnificationFactors[3];
189 double CroppingRegion[6];
190
191 double IndexStretch[3];
192 double IndexTranslate[3];
193
197
198private:
199 vtkImageResize(const vtkImageResize&) = delete;
200 void operator=(const vtkImageResize&) = delete;
201};
202
203#endif
interpolate data values from images
topologically and geometrically regular array of data
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 in response to a REQUEST_DATA request from the executive.
a simple class to control print indentation
Definition vtkIndent.h:49
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