00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00030
#ifndef __vtkImageThreshold_h
00031
#define __vtkImageThreshold_h
00032
00033
00034
#include "vtkImageToImageFilter.h"
00035
00036 class VTK_IMAGING_EXPORT vtkImageThreshold :
public vtkImageToImageFilter
00037 {
00038
public:
00039
static vtkImageThreshold *
New();
00040 vtkTypeRevisionMacro(vtkImageThreshold,
vtkImageToImageFilter);
00041
void PrintSelf(ostream& os,
vtkIndent indent);
00042
00044
void ThresholdByUpper(
float thresh);
00045
00047
void ThresholdByLower(
float thresh);
00048
00050
void ThresholdBetween(
float lower,
float upper);
00051
00053
00054 vtkSetMacro(ReplaceIn,
int);
00055 vtkGetMacro(ReplaceIn,
int);
00056 vtkBooleanMacro(ReplaceIn,
int);
00058
00060
00061
void SetInValue(
float val);
00062 vtkGetMacro(InValue,
float);
00064
00066
00067 vtkSetMacro(ReplaceOut,
int);
00068 vtkGetMacro(ReplaceOut,
int);
00069 vtkBooleanMacro(ReplaceOut,
int);
00071
00073
00074
void SetOutValue(
float val);
00075 vtkGetMacro(OutValue,
float);
00077
00079
00080 vtkGetMacro(UpperThreshold,
float);
00081 vtkGetMacro(LowerThreshold,
float);
00083
00085
00086 vtkSetMacro(OutputScalarType,
int);
00087 vtkGetMacro(OutputScalarType,
int);
00088 void SetOutputScalarTypeToDouble()
00089 {this->SetOutputScalarType(
VTK_DOUBLE);}
00090 void SetOutputScalarTypeToFloat()
00091 {this->SetOutputScalarType(
VTK_FLOAT);}
00092 void SetOutputScalarTypeToLong()
00093 {this->SetOutputScalarType(
VTK_LONG);}
00094 void SetOutputScalarTypeToUnsignedLong()
00095 {this->SetOutputScalarType(
VTK_UNSIGNED_LONG);};
00096 void SetOutputScalarTypeToInt()
00097 {this->SetOutputScalarType(
VTK_INT);}
00098 void SetOutputScalarTypeToUnsignedInt()
00099 {this->SetOutputScalarType(
VTK_UNSIGNED_INT);}
00100 void SetOutputScalarTypeToShort()
00101 {this->SetOutputScalarType(
VTK_SHORT);}
00102 void SetOutputScalarTypeToUnsignedShort()
00103 {this->SetOutputScalarType(
VTK_UNSIGNED_SHORT);}
00104 void SetOutputScalarTypeToChar()
00105 {this->SetOutputScalarType(
VTK_CHAR);}
00106 void SetOutputScalarTypeToUnsignedChar()
00107 {this->SetOutputScalarType(
VTK_UNSIGNED_CHAR);}
00109
00110
protected:
00111 vtkImageThreshold();
00112 ~vtkImageThreshold() {};
00113
00114 float UpperThreshold;
00115 float LowerThreshold;
00116 int ReplaceIn;
00117 float InValue;
00118 int ReplaceOut;
00119 float OutValue;
00120
00121 int OutputScalarType;
00122
00123
void ExecuteInformation(
vtkImageData *inData,
vtkImageData *outData);
00124 void ExecuteInformation(){this->
vtkImageToImageFilter::ExecuteInformation();};
00125
void ThreadedExecute(
vtkImageData *inData,
vtkImageData *outData,
00126
int extent[6],
int id);
00127
private:
00128 vtkImageThreshold(
const vtkImageThreshold&);
00129
void operator=(
const vtkImageThreshold&);
00130 };
00131
00132
#endif
00133
00134
00135