00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00029 #ifndef __vtkThresholdPoints_h
00030 #define __vtkThresholdPoints_h
00031
00032 #include "vtkPolyDataAlgorithm.h"
00033
00034 class VTK_GRAPHICS_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
00035 {
00036 public:
00037 static vtkThresholdPoints *New();
00038 vtkTypeRevisionMacro(vtkThresholdPoints,vtkPolyDataAlgorithm);
00039 void PrintSelf(ostream& os, vtkIndent indent);
00040
00043 void ThresholdByLower(double lower);
00044
00047 void ThresholdByUpper(double upper);
00048
00051 void ThresholdBetween(double lower, double upper);
00052
00054
00055 vtkSetMacro(UpperThreshold,double);
00056 vtkGetMacro(UpperThreshold,double);
00058
00060
00061 vtkSetMacro(LowerThreshold,double);
00062 vtkGetMacro(LowerThreshold,double);
00064
00065 protected:
00066 vtkThresholdPoints();
00067 ~vtkThresholdPoints() {};
00068
00069
00070 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00071
00072 virtual int FillInputPortInformation(int port, vtkInformation *info);
00073
00074 double LowerThreshold;
00075 double UpperThreshold;
00076
00077
00078 int (vtkThresholdPoints::*ThresholdFunction)(double s);
00079
00080
00081 int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00082 int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00083 int Between(double s) {return ( s >= this->LowerThreshold ?
00084 ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00085 private:
00086 vtkThresholdPoints(const vtkThresholdPoints&);
00087 void operator=(const vtkThresholdPoints&);
00088 };
00089
00090 #endif