vtkImageThreshold.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00039 #ifndef __vtkImageThreshold_h
00040 #define __vtkImageThreshold_h
00041
00042
00043 #include "vtkImageToImageFilter.h"
00044
00045 class VTK_IMAGING_EXPORT vtkImageThreshold : public vtkImageToImageFilter
00046 {
00047 public:
00048 static vtkImageThreshold *New();
00049 vtkTypeRevisionMacro(vtkImageThreshold,vtkImageToImageFilter);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053 void ThresholdByUpper(double thresh);
00054
00056 void ThresholdByLower(double thresh);
00057
00059 void ThresholdBetween(double lower, double upper);
00060
00062
00063 vtkSetMacro(ReplaceIn, int);
00064 vtkGetMacro(ReplaceIn, int);
00065 vtkBooleanMacro(ReplaceIn, int);
00067
00069
00070 void SetInValue(double val);
00071 vtkGetMacro(InValue, double);
00073
00075
00076 vtkSetMacro(ReplaceOut, int);
00077 vtkGetMacro(ReplaceOut, int);
00078 vtkBooleanMacro(ReplaceOut, int);
00080
00082
00083 void SetOutValue(double val);
00084 vtkGetMacro(OutValue, double);
00086
00088
00089 vtkGetMacro(UpperThreshold, double);
00090 vtkGetMacro(LowerThreshold, double);
00092
00094
00095 vtkSetMacro(OutputScalarType, int);
00096 vtkGetMacro(OutputScalarType, int);
00097 void SetOutputScalarTypeToDouble()
00098 {this->SetOutputScalarType(VTK_DOUBLE);}
00099 void SetOutputScalarTypeToFloat()
00100 {this->SetOutputScalarType(VTK_FLOAT);}
00101 void SetOutputScalarTypeToLong()
00102 {this->SetOutputScalarType(VTK_LONG);}
00103 void SetOutputScalarTypeToUnsignedLong()
00104 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00105 void SetOutputScalarTypeToInt()
00106 {this->SetOutputScalarType(VTK_INT);}
00107 void SetOutputScalarTypeToUnsignedInt()
00108 {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00109 void SetOutputScalarTypeToShort()
00110 {this->SetOutputScalarType(VTK_SHORT);}
00111 void SetOutputScalarTypeToUnsignedShort()
00112 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00113 void SetOutputScalarTypeToChar()
00114 {this->SetOutputScalarType(VTK_CHAR);}
00115 void SetOutputScalarTypeToUnsignedChar()
00116 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00118
00119 protected:
00120 vtkImageThreshold();
00121 ~vtkImageThreshold() {};
00122
00123 double UpperThreshold;
00124 double LowerThreshold;
00125 int ReplaceIn;
00126 double InValue;
00127 int ReplaceOut;
00128 double OutValue;
00129
00130 int OutputScalarType;
00131
00132 void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00133 void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
00134 void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00135 int extent[6], int id);
00136 private:
00137 vtkImageThreshold(const vtkImageThreshold&);
00138 void operator=(const vtkImageThreshold&);
00139 };
00140
00141 #endif
00142
00143
00144