VTK  9.3.20240424
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
118#ifndef vtkImageShiftScale_h
119#define vtkImageShiftScale_h
120
121#include "vtkImagingCoreModule.h" // For export macro
123
124VTK_ABI_NAMESPACE_BEGIN
125class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
126{
127public:
130 void PrintSelf(ostream& os, vtkIndent indent) override;
131
133
136 vtkSetMacro(Shift, double);
137 vtkGetMacro(Shift, double);
139
141
144 vtkSetMacro(Scale, double);
145 vtkGetMacro(Scale, double);
147
149
153 vtkSetMacro(OutputScalarType, int);
154 vtkGetMacro(OutputScalarType, int);
155 void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
156 void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
157 void SetOutputScalarTypeToLong() { this->SetOutputScalarType(VTK_LONG); }
158 void SetOutputScalarTypeToUnsignedLong() { this->SetOutputScalarType(VTK_UNSIGNED_LONG); }
159 void SetOutputScalarTypeToInt() { this->SetOutputScalarType(VTK_INT); }
160 void SetOutputScalarTypeToUnsignedInt() { this->SetOutputScalarType(VTK_UNSIGNED_INT); }
161 void SetOutputScalarTypeToShort() { this->SetOutputScalarType(VTK_SHORT); }
162 void SetOutputScalarTypeToUnsignedShort() { this->SetOutputScalarType(VTK_UNSIGNED_SHORT); }
163 void SetOutputScalarTypeToChar() { this->SetOutputScalarType(VTK_CHAR); }
164 void SetOutputScalarTypeToUnsignedChar() { this->SetOutputScalarType(VTK_UNSIGNED_CHAR); }
166
168
176 vtkSetMacro(ClampOverflow, vtkTypeBool);
177 vtkGetMacro(ClampOverflow, vtkTypeBool);
178 vtkBooleanMacro(ClampOverflow, vtkTypeBool);
180
181protected:
184
185 double Shift;
186 double Scale;
189
191
193 vtkImageData*** inData, vtkImageData** outData, int outExt[6], int threadId) override;
194
195private:
196 vtkImageShiftScale(const vtkImageShiftScale&) = delete;
197 void operator=(const vtkImageShiftScale&) = delete;
198};
199
200VTK_ABI_NAMESPACE_END
201#endif
topologically and geometrically regular array of data
shift and scale an input image
~vtkImageShiftScale() override
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,...
void SetOutputScalarTypeToInt()
Set the desired output scalar type.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOutputScalarTypeToLong()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedInt()
Set the desired output scalar type.
void SetOutputScalarTypeToDouble()
Set the desired output scalar type.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
static vtkImageShiftScale * New()
void SetOutputScalarTypeToChar()
Set the desired output scalar type.
void SetOutputScalarTypeToShort()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedLong()
Set the desired output scalar type.
void SetOutputScalarTypeToFloat()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedShort()
Set the desired output scalar type.
void SetOutputScalarTypeToUnsignedChar()
Set the desired output scalar type.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SHORT
Definition vtkType.h:36
#define VTK_UNSIGNED_INT
Definition vtkType.h:39
#define VTK_DOUBLE
Definition vtkType.h:43
#define VTK_UNSIGNED_CHAR
Definition vtkType.h:35
#define VTK_UNSIGNED_SHORT
Definition vtkType.h:37
#define VTK_INT
Definition vtkType.h:38
#define VTK_FLOAT
Definition vtkType.h:42
#define VTK_CHAR
Definition vtkType.h:33
#define VTK_UNSIGNED_LONG
Definition vtkType.h:41
#define VTK_LONG
Definition vtkType.h:40