VTK  9.1.0
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=========================================================================*/
40#ifndef vtkImageResize_h
41#define vtkImageResize_h
42
43#include "vtkImagingCoreModule.h" // For export macro
45
47
48class VTKIMAGINGCORE_EXPORT vtkImageResize : public vtkThreadedImageAlgorithm
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
55 enum
56 {
59 MAGNIFICATION_FACTORS
60 };
61
63
69 vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
70 vtkGetMacro(ResizeMethod, int);
71 void SetResizeMethodToOutputDimensions() { this->SetResizeMethod(OUTPUT_DIMENSIONS); }
72 void SetResizeMethodToOutputSpacing() { this->SetResizeMethod(OUTPUT_SPACING); }
73 void SetResizeMethodToMagnificationFactors() { this->SetResizeMethod(MAGNIFICATION_FACTORS); }
74 virtual const char* GetResizeMethodAsString();
76
78
83 vtkSetVector3Macro(OutputDimensions, int);
84 vtkGetVector3Macro(OutputDimensions, int);
86
88
93 vtkSetVector3Macro(OutputSpacing, double);
94 vtkGetVector3Macro(OutputSpacing, double);
96
98
103 vtkSetVector3Macro(MagnificationFactors, double);
104 vtkGetVector3Macro(MagnificationFactors, double);
106
108
117 vtkSetMacro(Border, vtkTypeBool);
118 vtkBooleanMacro(Border, vtkTypeBool);
119 vtkGetMacro(Border, vtkTypeBool);
121
123
127 vtkSetMacro(Cropping, vtkTypeBool);
128 vtkBooleanMacro(Cropping, vtkTypeBool);
129 vtkGetMacro(Cropping, vtkTypeBool);
131
133
138 vtkSetVector6Macro(CroppingRegion, double);
139 vtkGetVector6Macro(CroppingRegion, double);
141
143
146 vtkSetMacro(Interpolate, vtkTypeBool);
147 vtkBooleanMacro(Interpolate, vtkTypeBool);
148 vtkGetMacro(Interpolate, vtkTypeBool);
150
152
158
163
164protected:
166 ~vtkImageResize() override;
167
169
174 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
175 int id) override;
176
178 int OutputDimensions[3];
179 double OutputSpacing[3];
180 double MagnificationFactors[3];
183 double CroppingRegion[6];
184
185 double IndexStretch[3];
186 double IndexTranslate[3];
187
191
192private:
193 vtkImageResize(const vtkImageResize&) = delete;
194 void operator=(const vtkImageResize&) = delete;
195};
196
197#endif
interpolate data values from images
topologically and geometrically regular array of data
Definition: vtkImageData.h:57
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:43
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