VTK
vtkThresholdPoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkThresholdPoints.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkThresholdPoints_h
33 #define vtkThresholdPoints_h
34 
35 #include "vtkFiltersCoreModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
39 {
40 public:
41  static vtkThresholdPoints *New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
47  void ThresholdByLower(double lower);
48 
51  void ThresholdByUpper(double upper);
52 
55  void ThresholdBetween(double lower, double upper);
56 
58 
59  vtkSetMacro(UpperThreshold,double);
60  vtkGetMacro(UpperThreshold,double);
62 
64 
65  vtkSetMacro(LowerThreshold,double);
66  vtkGetMacro(LowerThreshold,double);
68 
70 
73  vtkSetMacro(OutputPointsPrecision,int);
74  vtkGetMacro(OutputPointsPrecision,int);
76 
77 protected:
80 
81  // Usual data generation method
83 
85 
89 
90  //BTX
91  int (vtkThresholdPoints::*ThresholdFunction)(double s);
92  //ETX
93 
94  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
95  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
96  int Between(double s) {return ( s >= this->LowerThreshold ?
97  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
98 private:
99  vtkThresholdPoints(const vtkThresholdPoints&); // Not implemented.
100  void operator=(const vtkThresholdPoints&); // Not implemented.
101 };
102 
103 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKFILTERSCORE_EXPORT
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
extracts points whose scalar value satisfies threshold criterion
Store zero or more vtkInformation instances.