00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00059 #ifndef __vtkImageCast_h
00060 #define __vtkImageCast_h
00061
00062
00063 #include "vtkImageToImageFilter.h"
00064
00065 class VTK_IMAGING_EXPORT vtkImageCast : public vtkImageToImageFilter
00066 {
00067 public:
00068 static vtkImageCast *New();
00069 vtkTypeMacro(vtkImageCast,vtkImageToImageFilter);
00070 void PrintSelf(ostream& os, vtkIndent indent);
00071
00073
00074 vtkSetMacro(OutputScalarType,int);
00075 vtkGetMacro(OutputScalarType,int);
00076 void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
00077 void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
00078 void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
00079 void SetOutputScalarTypeToUnsignedInt()
00080 {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
00081 void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
00082 void SetOutputScalarTypeToUnsignedLong()
00083 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00084 void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
00085 void SetOutputScalarTypeToUnsignedShort()
00086 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
00087 void SetOutputScalarTypeToUnsignedChar()
00088 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
00089 void SetOutputScalarTypeToChar()
00090 {this->SetOutputScalarType(VTK_CHAR);};
00092
00094
00097 vtkSetMacro(ClampOverflow, int);
00098 vtkGetMacro(ClampOverflow, int);
00099 vtkBooleanMacro(ClampOverflow, int);
00101
00102
00103 protected:
00104 vtkImageCast();
00105 ~vtkImageCast() {};
00106
00107 int ClampOverflow;
00108 int OutputScalarType;
00109 void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00110 void UpdateData(vtkDataObject *data);
00111 void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
00112 void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00113 int ext[6], int id);
00114
00115 private:
00116 vtkImageCast(const vtkImageCast&);
00117 void operator=(const vtkImageCast&);
00118 };
00119
00120 #endif
00121
00122
00123
00124