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