Imaging/vtkImageCast.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00037 #ifndef __vtkImageCast_h
00038 #define __vtkImageCast_h
00039
00040
00041 #include "vtkImageToImageFilter.h"
00042
00043 class VTK_IMAGING_EXPORT vtkImageCast : public vtkImageToImageFilter
00044 {
00045 public:
00046 static vtkImageCast *New();
00047 vtkTypeRevisionMacro(vtkImageCast,vtkImageToImageFilter);
00048 void PrintSelf(ostream& os, vtkIndent indent);
00049
00051
00052 vtkSetMacro(OutputScalarType,int);
00053 vtkGetMacro(OutputScalarType,int);
00054 void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
00055 void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
00056 void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
00057 void SetOutputScalarTypeToUnsignedInt()
00058 {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
00059 void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
00060 void SetOutputScalarTypeToUnsignedLong()
00061 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00062 void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
00063 void SetOutputScalarTypeToUnsignedShort()
00064 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
00065 void SetOutputScalarTypeToUnsignedChar()
00066 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
00067 void SetOutputScalarTypeToChar()
00068 {this->SetOutputScalarType(VTK_CHAR);};
00070
00072
00075 vtkSetMacro(ClampOverflow, int);
00076 vtkGetMacro(ClampOverflow, int);
00077 vtkBooleanMacro(ClampOverflow, int);
00079
00080
00081 protected:
00082 vtkImageCast();
00083 ~vtkImageCast() {};
00084
00085 int ClampOverflow;
00086 int OutputScalarType;
00087 void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00088 void UpdateData(vtkDataObject *data);
00089 void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
00090 void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00091 int ext[6], int id);
00092
00093 private:
00094 vtkImageCast(const vtkImageCast&);
00095 void operator=(const vtkImageCast&);
00096 };
00097
00098 #endif
00099
00100
00101
00102