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 =========================================================================*/
31 #ifndef vtkImageShiftScale_h
32 #define vtkImageShiftScale_h
33 
34 
35 #include "vtkImagingCoreModule.h" // For export macro
37 
38 class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
49  vtkSetMacro(Shift,double);
50  vtkGetMacro(Shift,double);
52 
54 
57  vtkSetMacro(Scale,double);
58  vtkGetMacro(Scale,double);
60 
62 
66  vtkSetMacro(OutputScalarType, int);
67  vtkGetMacro(OutputScalarType, int);
69  {this->SetOutputScalarType(VTK_DOUBLE);}
71  {this->SetOutputScalarType(VTK_FLOAT);}
73  {this->SetOutputScalarType(VTK_LONG);}
75  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
77  {this->SetOutputScalarType(VTK_INT);}
79  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
81  {this->SetOutputScalarType(VTK_SHORT);}
83  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
85  {this->SetOutputScalarType(VTK_CHAR);}
87  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
89 
91 
99  vtkSetMacro(ClampOverflow, int);
100  vtkGetMacro(ClampOverflow, int);
101  vtkBooleanMacro(ClampOverflow, int);
103 
104 protected:
107 
108  double Shift;
109  double Scale;
112 
116 
120  vtkImageData*** inData,
121  vtkImageData** outData,
122  int outExt[6],
123  int threadId);
124 private:
125  vtkImageShiftScale(const vtkImageShiftScale&) VTK_DELETE_FUNCTION;
126  void operator=(const vtkImageShiftScale&) VTK_DELETE_FUNCTION;
127 };
128 
129 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
shift and scale an input image
virtual void ThreadedRequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up,...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOutputScalarTypeToUnsignedInt()
void SetOutputScalarTypeToUnsignedLong()
void SetOutputScalarTypeToUnsignedShort()
static vtkImageShiftScale * New()
void SetOutputScalarTypeToUnsignedChar()
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_SHORT
Definition: vtkType.h:52
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
#define VTK_INT
Definition: vtkType.h:54
#define VTK_FLOAT
Definition: vtkType.h:58
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
#define VTK_LONG
Definition: vtkType.h:56