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 
35 
37 {
38 public:
39  static vtkImageShiftScale *New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
45  vtkSetMacro(Shift,double);
46  vtkGetMacro(Shift,double);
48 
50 
51  vtkSetMacro(Scale,double);
52  vtkGetMacro(Scale,double);
54 
56 
58  vtkSetMacro(OutputScalarType, int);
59  vtkGetMacro(OutputScalarType, int);
60  void SetOutputScalarTypeToDouble()
61  {this->SetOutputScalarType(VTK_DOUBLE);}
62  void SetOutputScalarTypeToFloat()
63  {this->SetOutputScalarType(VTK_FLOAT);}
64  void SetOutputScalarTypeToLong()
65  {this->SetOutputScalarType(VTK_LONG);}
66  void SetOutputScalarTypeToUnsignedLong()
67  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
68  void SetOutputScalarTypeToInt()
69  {this->SetOutputScalarType(VTK_INT);}
70  void SetOutputScalarTypeToUnsignedInt()
71  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
72  void SetOutputScalarTypeToShort()
73  {this->SetOutputScalarType(VTK_SHORT);}
74  void SetOutputScalarTypeToUnsignedShort()
75  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
76  void SetOutputScalarTypeToChar()
77  {this->SetOutputScalarType(VTK_CHAR);}
78  void SetOutputScalarTypeToUnsignedChar()
79  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
81 
83 
86  vtkSetMacro(ClampOverflow, int);
87  vtkGetMacro(ClampOverflow, int);
88  vtkBooleanMacro(ClampOverflow, int);
90 
91 protected:
94 
95  double Shift;
96  double Scale;
99 
100  virtual int RequestInformation(vtkInformation*,
103 
104  virtual void ThreadedRequestData(vtkInformation*,
107  vtkImageData*** inData,
108  vtkImageData** outData,
109  int outExt[6],
110  int threadId);
111 private:
112  vtkImageShiftScale(const vtkImageShiftScale&); // Not implemented.
113  void operator=(const vtkImageShiftScale&); // Not implemented.
114 };
115 
116 #endif