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) 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, vtkTypeBool);
94  vtkGetMacro(ClampOverflow, vtkTypeBool);
95  vtkBooleanMacro(ClampOverflow, vtkTypeBool);
97 
98 protected:
100  ~vtkImageShiftScale() override;
101 
102  double Shift;
103  double Scale;
106 
109  vtkInformationVector*) override;
110 
114  vtkImageData*** inData,
115  vtkImageData** outData,
116  int outExt[6],
117  int threadId) override;
118 private:
119  vtkImageShiftScale(const vtkImageShiftScale&) = delete;
120  void operator=(const vtkImageShiftScale&) = delete;
121 };
122 
123 #endif
vtkThreadedImageAlgorithm::ThreadedRequestData
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up,...
vtkImageShiftScale::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkImageShiftScale.h:70
vtkImageShiftScale::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImageShiftScale.h:64
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkImageShiftScale::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageShiftScale.h:76
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:37
vtkImageShiftScale::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkImageShiftScale.h:74
vtkThreadedImageAlgorithm.h
vtkImageShiftScale::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageShiftScale.h:68
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageShiftScale::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkImageShiftScale.h:78
vtkImageShiftScale::Shift
double Shift
Definition: vtkImageShiftScale.h:102
vtkThreadedImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:49
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageShiftScale
shift and scale an input image
Definition: vtkImageShiftScale.h:32
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:56
vtkImageShiftScale::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageShiftScale.h:80
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkImageShiftScale::OutputScalarType
int OutputScalarType
Definition: vtkImageShiftScale.h:104
vtkImageShiftScale::Scale
double Scale
Definition: vtkImageShiftScale.h:103
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
vtkImageShiftScale::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkImageShiftScale.h:66
vtkImageShiftScale::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageShiftScale.h:72
vtkImageShiftScale::ClampOverflow
vtkTypeBool ClampOverflow
Definition: vtkImageShiftScale.h:105
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkImageShiftScale::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageShiftScale.h:62
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69