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