VTK  9.2.6
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=========================================================================*/
140#ifndef vtkImageShiftScale_h
141#define vtkImageShiftScale_h
142
143#include "vtkImagingCoreModule.h" // For export macro
145
146class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
147{
148public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152
154
157 vtkSetMacro(Shift, double);
158 vtkGetMacro(Shift, double);
160
162
165 vtkSetMacro(Scale, double);
166 vtkGetMacro(Scale, double);
168
170
174 vtkSetMacro(OutputScalarType, int);
175 vtkGetMacro(OutputScalarType, int);
176 void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
177 void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
178 void SetOutputScalarTypeToLong() { this->SetOutputScalarType(VTK_LONG); }
179 void SetOutputScalarTypeToUnsignedLong() { this->SetOutputScalarType(VTK_UNSIGNED_LONG); }
180 void SetOutputScalarTypeToInt() { this->SetOutputScalarType(VTK_INT); }
181 void SetOutputScalarTypeToUnsignedInt() { this->SetOutputScalarType(VTK_UNSIGNED_INT); }
182 void SetOutputScalarTypeToShort() { this->SetOutputScalarType(VTK_SHORT); }
183 void SetOutputScalarTypeToUnsignedShort() { this->SetOutputScalarType(VTK_UNSIGNED_SHORT); }
184 void SetOutputScalarTypeToChar() { this->SetOutputScalarType(VTK_CHAR); }
185 void SetOutputScalarTypeToUnsignedChar() { this->SetOutputScalarType(VTK_UNSIGNED_CHAR); }
187
189
197 vtkSetMacro(ClampOverflow, vtkTypeBool);
198 vtkGetMacro(ClampOverflow, vtkTypeBool);
199 vtkBooleanMacro(ClampOverflow, vtkTypeBool);
201
202protected:
205
206 double Shift;
207 double Scale;
210
212
214 vtkImageData*** inData, vtkImageData** outData, int outExt[6], int threadId) override;
215
216private:
217 vtkImageShiftScale(const vtkImageShiftScale&) = delete;
218 void operator=(const vtkImageShiftScale&) = delete;
219};
220
221#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SHORT
Definition: vtkType.h:48
#define VTK_UNSIGNED_INT
Definition: vtkType.h:51
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:47
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:49
#define VTK_INT
Definition: vtkType.h:50
#define VTK_FLOAT
Definition: vtkType.h:54
#define VTK_CHAR
Definition: vtkType.h:45
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:53
#define VTK_LONG
Definition: vtkType.h:52