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:
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 
107 
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
vtkImageShiftScale::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkImageShiftScale.h:69
vtkImageShiftScale::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImageShiftScale.h:63
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
vtkImageShiftScale::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageShiftScale.h:75
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkThreadedImageAlgorithm
Generic filter that has one input..
Definition: vtkThreadedImageAlgorithm.h:37
vtkImageShiftScale::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkImageShiftScale::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkImageShiftScale.h:73
vtkThreadedImageAlgorithm.h
vtkImageShiftScale::ClampOverflow
int ClampOverflow
Definition: vtkImageShiftScale.h:102
vtkImageShiftScale::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageShiftScale.h:67
vtkImageShiftScale::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkImageShiftScale.h:77
vtkImageShiftScale::Shift
double Shift
Definition: vtkImageShiftScale.h:99
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:26
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageShiftScale
shift and scale an input image
Definition: vtkImageShiftScale.h:38
vtkImageShiftScale::vtkImageShiftScale
vtkImageShiftScale()
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:35
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:36
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:33
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkImageShiftScale::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageShiftScale.h:79
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkImageShiftScale::OutputScalarType
int OutputScalarType
Definition: vtkImageShiftScale.h:101
vtkImageShiftScale::Scale
double Scale
Definition: vtkImageShiftScale.h:100
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:29
vtkImageShiftScale::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkImageShiftScale.h:65
vtkImageShiftScale::New
static vtkImageShiftScale * New()
vtkImageShiftScale::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageShiftScale.h:71
vtkImageShiftScale::~vtkImageShiftScale
~vtkImageShiftScale()
vtkImagingCoreModule.h
VTK_INT
#define VTK_INT
Definition: vtkType.h:31
VTKIMAGINGCORE_EXPORT
#define VTKIMAGINGCORE_EXPORT
Definition: vtkImagingCoreModule.h:15
vtkImageShiftScale::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageShiftScale.h:61
vtkImageShiftScale::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImageShiftScale::ThreadedRequestData
virtual void ThreadedRequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int threadId)