VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
35 #include "vtkThreadedImageAlgorithm.h"
36 
37 class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
38 {
39 public:
40  static vtkImageShiftScale *New();
41  vtkTypeMacro(vtkImageShiftScale,vtkThreadedImageAlgorithm);
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 
87  vtkSetMacro(ClampOverflow, int);
88  vtkGetMacro(ClampOverflow, int);
89  vtkBooleanMacro(ClampOverflow, int);
91 
92 protected:
95 
96  double Shift;
97  double Scale;
100 
101  virtual int RequestInformation(vtkInformation*,
102  vtkInformationVector**,
103  vtkInformationVector*);
104 
105  virtual void ThreadedRequestData(vtkInformation*,
106  vtkInformationVector**,
107  vtkInformationVector*,
108  vtkImageData*** inData,
109  vtkImageData** outData,
110  int outExt[6],
111  int threadId);
112 private:
113  vtkImageShiftScale(const vtkImageShiftScale&); // Not implemented.
114  void operator=(const vtkImageShiftScale&); // Not implemented.
115 };
116 
117 #endif
void SetOutputScalarTypeToUnsignedShort()
shift and scale an input image
void SetOutputScalarTypeToUnsignedChar()
void SetOutputScalarTypeToUnsignedInt()
void SetOutputScalarTypeToUnsignedLong()