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
00067 #ifndef __vtkThresholdTextureCoords_h
00068 #define __vtkThresholdTextureCoords_h
00069
00070 #include "vtkDataSetToDataSetFilter.h"
00071
00072 class VTK_EXPORT vtkThresholdTextureCoords : public vtkDataSetToDataSetFilter
00073 {
00074 public:
00075 static vtkThresholdTextureCoords *New();
00076 vtkTypeMacro(vtkThresholdTextureCoords,vtkDataSetToDataSetFilter);
00077 void PrintSelf(ostream& os, vtkIndent indent);
00078
00080 void ThresholdByLower(float lower);
00081
00083 void ThresholdByUpper(float upper);
00084
00087 void ThresholdBetween(float lower, float upper);
00088
00090 vtkGetMacro(UpperThreshold,float);
00091 vtkGetMacro(LowerThreshold,float);
00092
00094 vtkSetClampMacro(TextureDimension,int,1,3);
00095 vtkGetMacro(TextureDimension,int);
00096
00099 vtkSetVector3Macro(InTextureCoord,float);
00100 vtkGetVectorMacro(InTextureCoord,float,3);
00101
00104 vtkSetVector3Macro(OutTextureCoord,float);
00105 vtkGetVectorMacro(OutTextureCoord,float,3);
00106
00107 protected:
00108 vtkThresholdTextureCoords();
00109 ~vtkThresholdTextureCoords() {};
00110 vtkThresholdTextureCoords(const vtkThresholdTextureCoords&) {};
00111 void operator=(const vtkThresholdTextureCoords&) {};
00112
00113
00114 void Execute();
00115
00116 float LowerThreshold;
00117 float UpperThreshold;
00118
00119 int TextureDimension;
00120
00121 float InTextureCoord[3];
00122 float OutTextureCoord[3];
00123
00124
00125 int (vtkThresholdTextureCoords::*ThresholdFunction)(float s);
00126
00127
00128 int Lower(float s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00129 int Upper(float s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00130 int Between(float s) {return ( s >= this->LowerThreshold ?
00131 ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00132 };
00133
00134 #endif
00135
00136