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

vtkThresholdPoints.h

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