VTK
vtkImageShiftScale.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageShiftScale.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 =========================================================================*/
30 #ifndef vtkImageShiftScale_h
31 #define vtkImageShiftScale_h
32 
33 
34 #include "vtkImagingCoreModule.h" // For export macro
36 
38 {
39 public:
40  static vtkImageShiftScale *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
46  vtkSetMacro(Shift,double);
47  vtkGetMacro(Shift,double);
49 
51 
52  vtkSetMacro(Scale,double);
53  vtkGetMacro(Scale,double);
55 
57 
59  vtkSetMacro(OutputScalarType, int);
60  vtkGetMacro(OutputScalarType, int);
62  {this->SetOutputScalarType(VTK_DOUBLE);}
64  {this->SetOutputScalarType(VTK_FLOAT);}
66  {this->SetOutputScalarType(VTK_LONG);}
68  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
70  {this->SetOutputScalarType(VTK_INT);}
72  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
74  {this->SetOutputScalarType(VTK_SHORT);}
76  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
78  {this->SetOutputScalarType(VTK_CHAR);}
80  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
82 
84 
90  vtkSetMacro(ClampOverflow, int);
91  vtkGetMacro(ClampOverflow, int);
92  vtkBooleanMacro(ClampOverflow, int);
94 
95 protected:
98 
99  double Shift;
100  double Scale;
103 
104  virtual int RequestInformation(vtkInformation*,
107 
108  virtual void ThreadedRequestData(vtkInformation*,
111  vtkImageData*** inData,
112  vtkImageData** outData,
113  int outExt[6],
114  int threadId);
115 private:
116  vtkImageShiftScale(const vtkImageShiftScale&); // Not implemented.
117  void operator=(const vtkImageShiftScale&); // Not implemented.
118 };
119 
120 #endif
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
void PrintSelf(ostream &os, vtkIndent indent)
void SetOutputScalarTypeToUnsignedShort()
#define VTK_DOUBLE
Definition: vtkType.h:36
Generic filter that has one input..
shift and scale an input image
#define VTK_FLOAT
Definition: vtkType.h:35
void SetOutputScalarTypeToUnsignedChar()
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 VTK_SHORT
Definition: vtkType.h:29
#define VTKIMAGINGCORE_EXPORT
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
void SetOutputScalarTypeToUnsignedInt()
void SetOutputScalarTypeToUnsignedLong()
#define VTK_INT
Definition: vtkType.h:31