VTK  9.3.0
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
34 #ifndef vtkImageResize_h
35 #define vtkImageResize_h
36 
37 #include "vtkImagingCoreModule.h" // For export macro
39 
40 VTK_ABI_NAMESPACE_BEGIN
42 
43 class VTKIMAGINGCORE_EXPORT vtkImageResize : public vtkThreadedImageAlgorithm
44 {
45 public:
46  static vtkImageResize* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
50  enum
51  {
54  MAGNIFICATION_FACTORS
55  };
56 
58 
64  vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
65  vtkGetMacro(ResizeMethod, int);
66  void SetResizeMethodToOutputDimensions() { this->SetResizeMethod(OUTPUT_DIMENSIONS); }
67  void SetResizeMethodToOutputSpacing() { this->SetResizeMethod(OUTPUT_SPACING); }
68  void SetResizeMethodToMagnificationFactors() { this->SetResizeMethod(MAGNIFICATION_FACTORS); }
69  virtual const char* GetResizeMethodAsString();
71 
73 
78  vtkSetVector3Macro(OutputDimensions, int);
79  vtkGetVector3Macro(OutputDimensions, int);
81 
83 
88  vtkSetVector3Macro(OutputSpacing, double);
89  vtkGetVector3Macro(OutputSpacing, double);
91 
93 
98  vtkSetVector3Macro(MagnificationFactors, double);
99  vtkGetVector3Macro(MagnificationFactors, double);
101 
103 
112  vtkSetMacro(Border, vtkTypeBool);
113  vtkBooleanMacro(Border, vtkTypeBool);
114  vtkGetMacro(Border, vtkTypeBool);
116 
118 
122  vtkSetMacro(Cropping, vtkTypeBool);
123  vtkBooleanMacro(Cropping, vtkTypeBool);
124  vtkGetMacro(Cropping, vtkTypeBool);
126 
128 
133  vtkSetVector6Macro(CroppingRegion, double);
134  vtkGetVector6Macro(CroppingRegion, double);
136 
138 
141  vtkSetMacro(Interpolate, vtkTypeBool);
142  vtkBooleanMacro(Interpolate, vtkTypeBool);
143  vtkGetMacro(Interpolate, vtkTypeBool);
145 
147 
153 
157  vtkMTimeType GetMTime() override;
158 
159 protected:
161  ~vtkImageResize() override;
162 
164 
169  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
170  int id) override;
171 
173  int OutputDimensions[3];
174  double OutputSpacing[3];
175  double MagnificationFactors[3];
178  double CroppingRegion[6];
179 
180  double IndexStretch[3];
181  double IndexTranslate[3];
182 
186 
187 private:
188  vtkImageResize(const vtkImageResize&) = delete;
189  void operator=(const vtkImageResize&) = delete;
190 };
191 
192 VTK_ABI_NAMESPACE_END
193 #endif
interpolate data values from images
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
High-quality image resizing filter.
virtual const char * GetResizeMethodAsString()
The resizing method to use.
vtkTypeBool Border
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkTypeBool Interpolate
virtual vtkAbstractImageInterpolator * GetInterpolator()
Set the interpolator for resampling the data.
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...
virtual vtkAbstractImageInterpolator * GetInternalInterpolator()
vtkAbstractImageInterpolator * Interpolator
void SetResizeMethodToOutputDimensions()
The resizing method to use.
void SetResizeMethodToMagnificationFactors()
The resizing method to use.
~vtkImageResize() override
static vtkImageResize * New()
virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler)
Set the interpolator for resampling the data.
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:38
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