VTK  9.4.20241219
vtkImageResize.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
64#ifndef vtkImageResize_h
65#define vtkImageResize_h
66
67#include "vtkImagingCoreModule.h" // For export macro
69
70VTK_ABI_NAMESPACE_BEGIN
72
73class VTKIMAGINGCORE_EXPORT vtkImageResize : public vtkThreadedImageAlgorithm
74{
75public:
78 void PrintSelf(ostream& os, vtkIndent indent) override;
79
80 enum
81 {
84 MAGNIFICATION_FACTORS
85 };
86
88
94 vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
95 vtkGetMacro(ResizeMethod, int);
96 void SetResizeMethodToOutputDimensions() { this->SetResizeMethod(OUTPUT_DIMENSIONS); }
97 void SetResizeMethodToOutputSpacing() { this->SetResizeMethod(OUTPUT_SPACING); }
98 void SetResizeMethodToMagnificationFactors() { this->SetResizeMethod(MAGNIFICATION_FACTORS); }
99 virtual const char* GetResizeMethodAsString();
101
103
108 vtkSetVector3Macro(OutputDimensions, int);
109 vtkGetVector3Macro(OutputDimensions, int);
111
113
118 vtkSetVector3Macro(OutputSpacing, double);
119 vtkGetVector3Macro(OutputSpacing, double);
121
123
128 vtkSetVector3Macro(MagnificationFactors, double);
129 vtkGetVector3Macro(MagnificationFactors, double);
131
133
142 vtkSetMacro(Border, vtkTypeBool);
143 vtkBooleanMacro(Border, vtkTypeBool);
144 vtkGetMacro(Border, vtkTypeBool);
146
148
152 vtkSetMacro(Cropping, vtkTypeBool);
153 vtkBooleanMacro(Cropping, vtkTypeBool);
154 vtkGetMacro(Cropping, vtkTypeBool);
156
158
163 vtkSetVector6Macro(CroppingRegion, double);
164 vtkGetVector6Macro(CroppingRegion, double);
166
168
171 vtkSetMacro(Interpolate, vtkTypeBool);
172 vtkBooleanMacro(Interpolate, vtkTypeBool);
173 vtkGetMacro(Interpolate, vtkTypeBool);
175
177
183
188
189protected:
191 ~vtkImageResize() override;
192
194
199 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
200 int id) override;
201
203 int OutputDimensions[3];
204 double OutputSpacing[3];
205 double MagnificationFactors[3];
208 double CroppingRegion[6];
209
210 double IndexStretch[3];
211 double IndexTranslate[3];
212
216
217private:
218 vtkImageResize(const vtkImageResize&) = delete;
219 void operator=(const vtkImageResize&) = delete;
220};
221
222VTK_ABI_NAMESPACE_END
223#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270