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

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 =========================================================================*/
00047 #ifndef __vtkThresholdPoints_h
00048 #define __vtkThresholdPoints_h
00049 
00050 #include "vtkDataSetToPolyDataFilter.h"
00051 
00052 class VTK_GRAPHICS_EXPORT vtkThresholdPoints : public vtkDataSetToPolyDataFilter
00053 {
00054 public:
00055   static vtkThresholdPoints *New();
00056   vtkTypeRevisionMacro(vtkThresholdPoints,vtkDataSetToPolyDataFilter);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058   
00060   void ThresholdByLower(float lower);
00061 
00063   void ThresholdByUpper(float upper);
00064 
00067   void ThresholdBetween(float lower, float upper);
00068 
00070 
00071   vtkGetMacro(UpperThreshold,float);
00072   vtkGetMacro(LowerThreshold,float);
00074 
00075 protected:
00076   vtkThresholdPoints();
00077   ~vtkThresholdPoints() {};
00078 
00079   // Usual data generation method
00080   void Execute();
00081 
00082   float LowerThreshold;
00083   float UpperThreshold;
00084 
00085   //BTX
00086   int (vtkThresholdPoints::*ThresholdFunction)(float s);
00087   //ETX
00088 
00089   int Lower(float s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00090   int Upper(float s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00091   int Between(float s) {return ( s >= this->LowerThreshold ? 
00092                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00093 private:
00094   vtkThresholdPoints(const vtkThresholdPoints&);  // Not implemented.
00095   void operator=(const vtkThresholdPoints&);  // Not implemented.
00096 };
00097 
00098 #endif