VTK: Imaging/Core/vtkImageShiftScale.h Source File

| VTK 9.3.1

vtkImageShiftScale.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
28 #ifndef vtkImageShiftScale_h
29 #define vtkImageShiftScale_h
30
31 #include "vtkImagingCoreModule.h" // For export macro
32 #include "vtkThreadedImageAlgorithm.h"
33
34 VTK_ABI_NAMESPACE_BEGIN
35 class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
36 {
37 public:
38 static vtkImageShiftScale* New();
39 vtkTypeMacro(vtkImageShiftScale, vtkThreadedImageAlgorithm);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
46 vtkSetMacro(Shift, double);
47 vtkGetMacro(Shift, double);
49
51
54 vtkSetMacro(Scale, double);
55 vtkGetMacro(Scale, double);
57
59
63 vtkSetMacro(OutputScalarType, int);
64 vtkGetMacro(OutputScalarType, int);
65 void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
66 void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
67 void SetOutputScalarTypeToLong() { this->SetOutputScalarType(VTK_LONG); }
68 void SetOutputScalarTypeToUnsignedLong() { this->SetOutputScalarType(VTK_UNSIGNED_LONG); }
69 void SetOutputScalarTypeToInt() { this->SetOutputScalarType(VTK_INT); }
70 void SetOutputScalarTypeToUnsignedInt() { this->SetOutputScalarType(VTK_UNSIGNED_INT); }
71 void SetOutputScalarTypeToShort() { this->SetOutputScalarType(VTK_SHORT); }
72 void SetOutputScalarTypeToUnsignedShort() { this->SetOutputScalarType(VTK_UNSIGNED_SHORT); }
73 void SetOutputScalarTypeToChar() { this->SetOutputScalarType(VTK_CHAR); }
74 void SetOutputScalarTypeToUnsignedChar() { this->SetOutputScalarType(VTK_UNSIGNED_CHAR); }
76
78
86 vtkSetMacro(ClampOverflow, vtkTypeBool);
87 vtkGetMacro(ClampOverflow, vtkTypeBool);
88 vtkBooleanMacro(ClampOverflow, vtkTypeBool);
90
91 protected:
92 vtkImageShiftScale();
93 ~vtkImageShiftScale() override;
94
95 double Shift;
96 double Scale;
97 int OutputScalarType;
98 vtkTypeBool ClampOverflow;
99
100 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
101
102 void ThreadedRequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*,
103 vtkImageData*** inData, vtkImageData** outData, int outExt[6], int threadId) override;
104
105 private:
106 vtkImageShiftScale(const vtkImageShiftScale&) = delete;
107 void operator=(const vtkImageShiftScale&) = delete;
108 };
109
110 VTK_ABI_NAMESPACE_END
111 #endif
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkImageShiftScale
shift and scale an input image
Definition: vtkImageShiftScale.h:36
vtkImageShiftScale::~vtkImageShiftScale
~vtkImageShiftScale() override
vtkImageShiftScale::ThreadedRequestData
void ThreadedRequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int threadId) override
If the subclass does not define an Execute method, then the task will be broken up,...
vtkImageShiftScale::Shift
double Shift
Definition: vtkImageShiftScale.h:95
vtkImageShiftScale::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:69
vtkImageShiftScale::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageShiftScale::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:67
vtkImageShiftScale::Scale
double Scale
Definition: vtkImageShiftScale.h:96
vtkImageShiftScale::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:70
vtkImageShiftScale::vtkImageShiftScale
vtkImageShiftScale()
vtkImageShiftScale::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:65
vtkImageShiftScale::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageShiftScale::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:73
vtkImageShiftScale::ClampOverflow
vtkTypeBool ClampOverflow
Definition: vtkImageShiftScale.h:98
vtkImageShiftScale::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:71
vtkImageShiftScale::OutputScalarType
int OutputScalarType
Definition: vtkImageShiftScale.h:97
vtkImageShiftScale::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:68
vtkImageShiftScale::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:66
vtkImageShiftScale::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:72
vtkImageShiftScale::New
static vtkImageShiftScale * New()
vtkImageShiftScale::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Set the desired output scalar type.
Definition: vtkImageShiftScale.h:74
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:34
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkThreadedImageAlgorithm.h
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:36
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:39
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:43
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:35
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:37
VTK_INT
#define VTK_INT
Definition: vtkType.h:38
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:42
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:33
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:41
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:40