00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkImageShiftScale_h
00028 #define __vtkImageShiftScale_h
00029
00030
00031 #include "vtkThreadedImageAlgorithm.h"
00032
00033 class VTK_IMAGING_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
00034 {
00035 public:
00036 static vtkImageShiftScale *New();
00037 vtkTypeRevisionMacro(vtkImageShiftScale,vtkThreadedImageAlgorithm);
00038 void PrintSelf(ostream& os, vtkIndent indent);
00039
00041
00042 vtkSetMacro(Shift,double);
00043 vtkGetMacro(Shift,double);
00045
00047
00048 vtkSetMacro(Scale,double);
00049 vtkGetMacro(Scale,double);
00051
00053
00055 vtkSetMacro(OutputScalarType, int);
00056 vtkGetMacro(OutputScalarType, int);
00057 void SetOutputScalarTypeToDouble()
00058 {this->SetOutputScalarType(VTK_DOUBLE);}
00059 void SetOutputScalarTypeToFloat()
00060 {this->SetOutputScalarType(VTK_FLOAT);}
00061 void SetOutputScalarTypeToLong()
00062 {this->SetOutputScalarType(VTK_LONG);}
00063 void SetOutputScalarTypeToUnsignedLong()
00064 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00065 void SetOutputScalarTypeToInt()
00066 {this->SetOutputScalarType(VTK_INT);}
00067 void SetOutputScalarTypeToUnsignedInt()
00068 {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00069 void SetOutputScalarTypeToShort()
00070 {this->SetOutputScalarType(VTK_SHORT);}
00071 void SetOutputScalarTypeToUnsignedShort()
00072 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00073 void SetOutputScalarTypeToChar()
00074 {this->SetOutputScalarType(VTK_CHAR);}
00075 void SetOutputScalarTypeToUnsignedChar()
00076 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00078
00080
00083 vtkSetMacro(ClampOverflow, int);
00084 vtkGetMacro(ClampOverflow, int);
00085 vtkBooleanMacro(ClampOverflow, int);
00087
00088 protected:
00089 vtkImageShiftScale();
00090 ~vtkImageShiftScale();
00091
00092 double Shift;
00093 double Scale;
00094 int OutputScalarType;
00095 int ClampOverflow;
00096
00097 virtual int RequestInformation(vtkInformation*,
00098 vtkInformationVector**,
00099 vtkInformationVector*);
00100
00101 virtual void ThreadedRequestData(vtkInformation*,
00102 vtkInformationVector**,
00103 vtkInformationVector*,
00104 vtkImageData*** inData,
00105 vtkImageData** outData,
00106 int outExt[6],
00107 int threadId);
00108 private:
00109 vtkImageShiftScale(const vtkImageShiftScale&);
00110 void operator=(const vtkImageShiftScale&);
00111 };
00112
00113 #endif