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