00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00030 #ifndef __vtkImageCast_h
00031 #define __vtkImageCast_h
00032
00033
00034 #include "vtkThreadedImageAlgorithm.h"
00035
00036 class VTK_IMAGING_EXPORT vtkImageCast : public vtkThreadedImageAlgorithm
00037 {
00038 public:
00039 static vtkImageCast *New();
00040 vtkTypeRevisionMacro(vtkImageCast,vtkThreadedImageAlgorithm);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00044
00045 vtkSetMacro(OutputScalarType,int);
00046 vtkGetMacro(OutputScalarType,int);
00047 void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
00048 void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
00049 void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
00050 void SetOutputScalarTypeToUnsignedInt()
00051 {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
00052 void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
00053 void SetOutputScalarTypeToUnsignedLong()
00054 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00055 void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
00056 void SetOutputScalarTypeToUnsignedShort()
00057 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
00058 void SetOutputScalarTypeToUnsignedChar()
00059 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
00060 void SetOutputScalarTypeToChar()
00061 {this->SetOutputScalarType(VTK_CHAR);};
00063
00065
00068 vtkSetMacro(ClampOverflow, int);
00069 vtkGetMacro(ClampOverflow, int);
00070 vtkBooleanMacro(ClampOverflow, int);
00072
00073
00074 protected:
00075 vtkImageCast();
00076 ~vtkImageCast() {};
00077
00078 int ClampOverflow;
00079 int OutputScalarType;
00080 virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *);
00081
00082 void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
00083 int ext[6], int id);
00084
00085 private:
00086 vtkImageCast(const vtkImageCast&);
00087 void operator=(const vtkImageCast&);
00088 };
00089
00090 #endif
00091
00092
00093
00094