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 
37 
39 
41 {
42 public:
43  static vtkImageResize *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
47  enum
48  {
51  MAGNIFICATION_FACTORS
52  };
53 
55 
59  vtkSetClampMacro(ResizeMethod, int, OUTPUT_DIMENSIONS, MAGNIFICATION_FACTORS);
60  vtkGetMacro(ResizeMethod, int);
62  this->SetResizeMethod(OUTPUT_DIMENSIONS); }
64  this->SetResizeMethod(OUTPUT_SPACING); }
66  this->SetResizeMethod(MAGNIFICATION_FACTORS); }
67  virtual const char *GetResizeMethodAsString();
69 
71 
74  vtkSetVector3Macro(OutputDimensions, int);
75  vtkGetVector3Macro(OutputDimensions, int);
77 
79 
82  vtkSetVector3Macro(OutputSpacing, double);
83  vtkGetVector3Macro(OutputSpacing, double);
85 
87 
90  vtkSetVector3Macro(MagnificationFactors, double);
91  vtkGetVector3Macro(MagnificationFactors, double);
93 
95 
103  vtkSetMacro(Border, int);
104  vtkBooleanMacro(Border, int);
105  vtkGetMacro(Border, int);
107 
109 
111  vtkSetMacro(Cropping, int);
112  vtkBooleanMacro(Cropping, int);
113  vtkGetMacro(Cropping, int);
115 
117 
120  vtkSetVector6Macro(CroppingRegion, double);
121  vtkGetVector6Macro(CroppingRegion, double);
123 
125 
126  vtkSetMacro(Interpolate, int);
127  vtkBooleanMacro(Interpolate, int);
128  vtkGetMacro(Interpolate, int);
130 
132 
133  virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler);
134  virtual vtkAbstractImageInterpolator *GetInterpolator();
136 
138  unsigned long int GetMTime();
139 
140 protected:
141  vtkImageResize();
142  ~vtkImageResize();
143 
144  virtual vtkAbstractImageInterpolator *GetInternalInterpolator();
145 
152  virtual void ThreadedRequestData(vtkInformation *request,
153  vtkInformationVector **inputVector,
154  vtkInformationVector *outputVector,
155  vtkImageData ***inData,
156  vtkImageData **outData, int ext[6], int id);
157 
159  int OutputDimensions[3];
160  double OutputSpacing[3];
161  double MagnificationFactors[3];
162  int Border;
163  int Cropping;
164  double CroppingRegion[6];
165 
166  double IndexStretch[3];
167  double IndexTranslate[3];
168 
172 
173 private:
174  vtkImageResize(const vtkImageResize&); // Not implemented.
175  void operator=(const vtkImageResize&); // Not implemented.
176 };
177 
178 #endif