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 =========================================================================*/
25 #ifndef vtkImageShiftScale_h
26 #define vtkImageShiftScale_h
27 
28 
29 #include "vtkImagingCoreModule.h" // For export macro
31 
32 class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
33 {
34 public:
35  static vtkImageShiftScale *New();
37  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
38 
40 
43  vtkSetMacro(Shift,double);
44  vtkGetMacro(Shift,double);
46 
48 
51  vtkSetMacro(Scale,double);
52  vtkGetMacro(Scale,double);
54 
56 
60  vtkSetMacro(OutputScalarType, int);
61  vtkGetMacro(OutputScalarType, int);
63  {this->SetOutputScalarType(VTK_DOUBLE);}
65  {this->SetOutputScalarType(VTK_FLOAT);}
67  {this->SetOutputScalarType(VTK_LONG);}
69  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
71  {this->SetOutputScalarType(VTK_INT);}
73  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
75  {this->SetOutputScalarType(VTK_SHORT);}
77  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
79  {this->SetOutputScalarType(VTK_CHAR);}
81  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
83 
85 
93  vtkSetMacro(ClampOverflow, int);
94  vtkGetMacro(ClampOverflow, int);
95  vtkBooleanMacro(ClampOverflow, int);
97 
98 protected:
100  ~vtkImageShiftScale() VTK_OVERRIDE;
101 
102  double Shift;
103  double Scale;
104  int OutputScalarType;
105  int ClampOverflow;
106 
107  int RequestInformation(vtkInformation*,
109  vtkInformationVector*) VTK_OVERRIDE;
110 
111  void ThreadedRequestData(vtkInformation*,
114  vtkImageData*** inData,
115  vtkImageData** outData,
116  int outExt[6],
117  int threadId) VTK_OVERRIDE;
118 private:
119  vtkImageShiftScale(const vtkImageShiftScale&) VTK_DELETE_FUNCTION;
120  void operator=(const vtkImageShiftScale&) VTK_DELETE_FUNCTION;
121 };
122 
123 #endif
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
void SetOutputScalarTypeToChar()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedShort()
Set the desired output scalar type.
#define VTK_DOUBLE
Definition: vtkType.h:59
Generic filter that has one input.
shift and scale an input image
#define VTK_FLOAT
Definition: vtkType.h:58
void SetOutputScalarTypeToDouble()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedChar()
Set the desired output scalar type.
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
#define VTK_SHORT
Definition: vtkType.h:52
void SetOutputScalarTypeToInt()
Set the desired output scalar type.
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_LONG
Definition: vtkType.h:56
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
void SetOutputScalarTypeToShort()
Set the desired output scalar type.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOutputScalarTypeToLong()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedInt()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedLong()
Set the desired output scalar type.
#define VTK_INT
Definition: vtkType.h:54