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 =========================================================================*/
33 #ifndef vtkImageResize_h
34 #define vtkImageResize_h
35 
36 #include "vtkImagingCoreModule.h" // For export macro
38 
40 
42 {
43 public:
44  static vtkImageResize *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
48  enum
49  {
52  MAGNIFICATION_FACTORS
53  };
54 
56 
60  vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
61  vtkGetMacro(ResizeMethod, int);
63  this->SetResizeMethod(OUTPUT_DIMENSIONS); }
65  this->SetResizeMethod(OUTPUT_SPACING); }
67  this->SetResizeMethod(MAGNIFICATION_FACTORS); }
68  virtual const char *GetResizeMethodAsString();
70 
72 
75  vtkSetVector3Macro(OutputDimensions, int);
76  vtkGetVector3Macro(OutputDimensions, int);
78 
80 
83  vtkSetVector3Macro(OutputSpacing, double);
84  vtkGetVector3Macro(OutputSpacing, double);
86 
88 
91  vtkSetVector3Macro(MagnificationFactors, double);
92  vtkGetVector3Macro(MagnificationFactors, double);
94 
96 
104  vtkSetMacro(Border, int);
105  vtkBooleanMacro(Border, int);
106  vtkGetMacro(Border, int);
108 
110 
112  vtkSetMacro(Cropping, int);
113  vtkBooleanMacro(Cropping, int);
114  vtkGetMacro(Cropping, int);
116 
118 
121  vtkSetVector6Macro(CroppingRegion, double);
122  vtkGetVector6Macro(CroppingRegion, double);
124 
126 
127  vtkSetMacro(Interpolate, int);
128  vtkBooleanMacro(Interpolate, int);
129  vtkGetMacro(Interpolate, int);
131 
133 
134  virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler);
135  virtual vtkAbstractImageInterpolator *GetInterpolator();
137 
139  unsigned long int GetMTime();
140 
141 protected:
142  vtkImageResize();
143  ~vtkImageResize();
144 
145  virtual vtkAbstractImageInterpolator *GetInternalInterpolator();
146 
153  virtual void ThreadedRequestData(vtkInformation *request,
154  vtkInformationVector **inputVector,
155  vtkInformationVector *outputVector,
156  vtkImageData ***inData,
157  vtkImageData **outData, int ext[6], int id);
158 
160  int OutputDimensions[3];
161  double OutputSpacing[3];
162  double MagnificationFactors[3];
163  int Border;
164  int Cropping;
165  double CroppingRegion[6];
166 
167  double IndexStretch[3];
168  double IndexTranslate[3];
169 
173 
174 private:
175  vtkImageResize(const vtkImageResize&); // Not implemented.
176  void operator=(const vtkImageResize&); // Not implemented.
177 };
178 
179 #endif
interpolate data values from images
void SetResizeMethodToMagnificationFactors()
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkAbstractImageInterpolator * NNInterpolator
Generic filter that has one input..
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKIMAGINGCORE_EXPORT
vtkAbstractImageInterpolator * Interpolator
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
void SetResizeMethodToOutputSpacing()
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetResizeMethodToOutputDimensions()
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
High-quality image resizing filter.