• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Graphics/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 =========================================================================*/
00029 #ifndef __vtkThresholdPoints_h
00030 #define __vtkThresholdPoints_h
00031 
00032 #include "vtkPolyDataAlgorithm.h"
00033 
00034 class VTK_GRAPHICS_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
00035 {
00036 public:
00037   static vtkThresholdPoints *New();
00038   vtkTypeRevisionMacro(vtkThresholdPoints,vtkPolyDataAlgorithm);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040   
00043   void ThresholdByLower(double lower);
00044 
00047   void ThresholdByUpper(double upper);
00048 
00051   void ThresholdBetween(double lower, double upper);
00052 
00054 
00055   vtkSetMacro(UpperThreshold,double);
00056   vtkGetMacro(UpperThreshold,double);
00058 
00060 
00061   vtkSetMacro(LowerThreshold,double);
00062   vtkGetMacro(LowerThreshold,double);
00064 
00065 protected:
00066   vtkThresholdPoints();
00067   ~vtkThresholdPoints() {};
00068 
00069   // Usual data generation method
00070   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00071 
00072   virtual int FillInputPortInformation(int port, vtkInformation *info);
00073 
00074   double LowerThreshold;
00075   double UpperThreshold;
00076 
00077   //BTX
00078   int (vtkThresholdPoints::*ThresholdFunction)(double s);
00079   //ETX
00080 
00081   int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
00082   int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
00083   int Between(double s) {return ( s >= this->LowerThreshold ? 
00084                                ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
00085 private:
00086   vtkThresholdPoints(const vtkThresholdPoints&);  // Not implemented.
00087   void operator=(const vtkThresholdPoints&);  // Not implemented.
00088 };
00089 
00090 #endif

Generated by  doxygen 1.7.1