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
00039
00065 #ifndef __vtkThresholdTextureCoords_h
00066 #define __vtkThresholdTextureCoords_h
00067
00068 #include "vtkDataSetToDataSetFilter.h"
00069
00070 class VTK_GRAPHICS_EXPORT vtkThresholdTextureCoords : public vtkDataSetToDataSetFilter
00071 {
00072 public:
00073 static vtkThresholdTextureCoords *New();
00074 vtkTypeMacro(vtkThresholdTextureCoords,vtkDataSetToDataSetFilter);
00075 void PrintSelf(ostream& os, vtkIndent indent);
00076
00078 void ThresholdByLower(float lower);
00079
00081 void ThresholdByUpper(float upper);
00082
00085 void ThresholdBetween(float lower, float upper);
00086
00088
00089 vtkGetMacro(UpperThreshold,float);
00090 vtkGetMacro(LowerThreshold,float);
00092
00094
00095 vtkSetClampMacro(TextureDimension,int,1,3);
00096 vtkGetMacro(TextureDimension,int);
00098
00100
00102 vtkSetVector3Macro(InTextureCoord,float);
00103 vtkGetVectorMacro(InTextureCoord,float,3);
00105
00107
00109 vtkSetVector3Macro(OutTextureCoord,float);
00110 vtkGetVectorMacro(OutTextureCoord,float,3);
00112
00113 protected:
00114 vtkThresholdTextureCoords();
00115 ~vtkThresholdTextureCoords() {};
00116
00117
00118 void Execute();
00119
00120 float LowerThreshold;
00121 float UpperThreshold;
00122
00123 int TextureDimension;
00124
00125 float InTextureCoord[3];
00126 float OutTextureCoord[3];
00127
00128
00129 int (vtkThresholdTextureCoords::*ThresholdFunction)(float s);
00130
00131
00132 int Lower(float s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00133 int Upper(float s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00134 int Between(float s) {return ( s >= this->LowerThreshold ?
00135 ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00136 private:
00137 vtkThresholdTextureCoords(const vtkThresholdTextureCoords&);
00138 void operator=(const vtkThresholdTextureCoords&);
00139 };
00140
00141 #endif