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 =========================================================================*/
27 #ifndef vtkThresholdPoints_h
28 #define vtkThresholdPoints_h
29 
30 #include "vtkFiltersCoreModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 class VTKFILTERSCORE_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
34 {
35 public:
36  static vtkThresholdPoints *New();
38  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
39 
43  void ThresholdByLower(double lower);
44 
48  void ThresholdByUpper(double upper);
49 
54  void ThresholdBetween(double lower, double upper);
55 
57 
60  vtkSetMacro(UpperThreshold,double);
61  vtkGetMacro(UpperThreshold,double);
63 
65 
68  vtkSetMacro(LowerThreshold,double);
69  vtkGetMacro(LowerThreshold,double);
71 
73 
78  vtkSetMacro(OutputPointsPrecision,int);
79  vtkGetMacro(OutputPointsPrecision,int);
81 
82 protected:
84  ~vtkThresholdPoints() VTK_OVERRIDE {}
85 
86  // Usual data generation method
88 
89  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
90 
94 
95  int (vtkThresholdPoints::*ThresholdFunction)(double s);
96 
97  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
98  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
99  int Between(double s) {return ( s >= this->LowerThreshold ?
100  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
101 private:
102  vtkThresholdPoints(const vtkThresholdPoints&) VTK_DELETE_FUNCTION;
103  void operator=(const vtkThresholdPoints&) VTK_DELETE_FUNCTION;
104 };
105 
106 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
extracts points whose scalar value satisfies threshold criterion
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
~vtkThresholdPoints() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.