Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Graphics/vtkThresholdPoints.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkThresholdPoints.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00036 #ifndef __vtkThresholdPoints_h
00037 #define __vtkThresholdPoints_h
00038 
00039 #include "vtkDataSetToPolyDataFilter.h"
00040 
00041 class VTK_GRAPHICS_EXPORT vtkThresholdPoints : public vtkDataSetToPolyDataFilter
00042 {
00043 public:
00044   static vtkThresholdPoints *New();
00045   vtkTypeRevisionMacro(vtkThresholdPoints,vtkDataSetToPolyDataFilter);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047   
00049   void ThresholdByLower(float lower);
00050 
00052   void ThresholdByUpper(float upper);
00053 
00056   void ThresholdBetween(float lower, float upper);
00057 
00059 
00060   vtkGetMacro(UpperThreshold,float);
00061   vtkGetMacro(LowerThreshold,float);
00063 
00064 protected:
00065   vtkThresholdPoints();
00066   ~vtkThresholdPoints() {};
00067 
00068   // Usual data generation method
00069   void Execute();
00070 
00071   float LowerThreshold;
00072   float UpperThreshold;
00073 
00074   //BTX
00075   int (vtkThresholdPoints::*ThresholdFunction)(float s);
00076   //ETX
00077 
00078   int Lower(float s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00079   int Upper(float s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00080   int Between(float s) {return ( s >= this->LowerThreshold ? 
00081                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00082 private:
00083   vtkThresholdPoints(const vtkThresholdPoints&);  // Not implemented.
00084   void operator=(const vtkThresholdPoints&);  // Not implemented.
00085 };
00086 
00087 #endif