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 =========================================================================*/
30 #ifndef __vtkImageShiftScale_h
31 #define __vtkImageShiftScale_h
32 
33 
35 
37 {
38 public:
39  static vtkImageShiftScale *New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
45  vtkSetMacro(Shift,double);
46  vtkGetMacro(Shift,double);
48 
50 
51  vtkSetMacro(Scale,double);
52  vtkGetMacro(Scale,double);
54 
56 
58  vtkSetMacro(OutputScalarType, int);
59  vtkGetMacro(OutputScalarType, int);
61  {this->SetOutputScalarType(VTK_DOUBLE);}
63  {this->SetOutputScalarType(VTK_FLOAT);}
65  {this->SetOutputScalarType(VTK_LONG);}
67  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
69  {this->SetOutputScalarType(VTK_INT);}
71  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
73  {this->SetOutputScalarType(VTK_SHORT);}
75  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
77  {this->SetOutputScalarType(VTK_CHAR);}
79  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
81 
83 
86  vtkSetMacro(ClampOverflow, int);
87  vtkGetMacro(ClampOverflow, int);
88  vtkBooleanMacro(ClampOverflow, int);
90 
91 protected:
94 
95  double Shift;
96  double Scale;
99 
100  virtual int RequestInformation(vtkInformation*,
103 
104  virtual void ThreadedRequestData(vtkInformation*,
107  vtkImageData*** inData,
108  vtkImageData** outData,
109  int outExt[6],
110  int threadId);
111 private:
112  vtkImageShiftScale(const vtkImageShiftScale&); // Not implemented.
113  void operator=(const vtkImageShiftScale&); // Not implemented.
114 };
115 
116 #endif
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
void PrintSelf(ostream &os, vtkIndent indent)
void SetOutputScalarTypeToUnsignedShort()
#define VTK_DOUBLE
Definition: vtkType.h:36
Generic filter that has one input..
shift and scale an input image
#define VTK_FLOAT
Definition: vtkType.h:35
void SetOutputScalarTypeToUnsignedChar()
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
void SetOutputScalarTypeToUnsignedInt()
void SetOutputScalarTypeToUnsignedLong()
#define VTK_INT
Definition: vtkType.h:31