VTK
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);
51
52 enum
53 {
56 MAGNIFICATION_FACTORS
57 };
58
60
66 vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
67 vtkGetMacro(ResizeMethod, int);
69 this->SetResizeMethod(OUTPUT_DIMENSIONS); }
71 this->SetResizeMethod(OUTPUT_SPACING); }
73 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, int);
118 vtkBooleanMacro(Border, int);
119 vtkGetMacro(Border, int);
121
123
127 vtkSetMacro(Cropping, int);
128 vtkBooleanMacro(Cropping, int);
129 vtkGetMacro(Cropping, int);
131
133
138 vtkSetVector6Macro(CroppingRegion, double);
139 vtkGetVector6Macro(CroppingRegion, double);
141
143
146 vtkSetMacro(Interpolate, int);
147 vtkBooleanMacro(Interpolate, int);
148 vtkGetMacro(Interpolate, int);
150
152
158
163
164protected:
167
169
176 virtual void ThreadedRequestData(vtkInformation *request,
177 vtkInformationVector **inputVector,
178 vtkInformationVector *outputVector,
179 vtkImageData ***inData,
180 vtkImageData **outData, int ext[6], int id);
181
183 int OutputDimensions[3];
184 double OutputSpacing[3];
185 double MagnificationFactors[3];
188 double CroppingRegion[6];
189
190 double IndexStretch[3];
191 double IndexTranslate[3];
192
196
197private:
198 vtkImageResize(const vtkImageResize&) VTK_DELETE_FUNCTION;
199 void operator=(const vtkImageResize&) VTK_DELETE_FUNCTION;
200};
201
202#endif
interpolate data values from images
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
High-quality image resizing filter.
virtual vtkAbstractImageInterpolator * GetInterpolator()
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkAbstractImageInterpolator * NNInterpolator
vtkAbstractImageInterpolator * Interpolator
void SetResizeMethodToOutputDimensions()
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id)
If the subclass does not define an Execute method, then the task will be broken up,...
void SetResizeMethodToMagnificationFactors()
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkMTimeType GetMTime()
Get the modified time of the filter.
virtual const char * GetResizeMethodAsString()
static vtkImageResize * New()
virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler)
Set the interpolator for resampling the data.
virtual vtkAbstractImageInterpolator * GetInternalInterpolator()
void SetResizeMethodToOutputSpacing()
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.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248