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 =========================================================================*/
34 #ifndef vtkThresholdPoints_h
35 #define vtkThresholdPoints_h
36 
37 #include "vtkFiltersCoreModule.h" // For export macro
38 #include "vtkPolyDataAlgorithm.h"
39 
40 class VTKFILTERSCORE_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
41 {
42 public:
43  static vtkThresholdPoints *New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
50  void ThresholdByLower(double lower);
51 
55  void ThresholdByUpper(double upper);
56 
61  void ThresholdBetween(double lower, double upper);
62 
64 
67  vtkSetMacro(UpperThreshold,double);
68  vtkGetMacro(UpperThreshold,double);
70 
72 
75  vtkSetMacro(LowerThreshold,double);
76  vtkGetMacro(LowerThreshold,double);
78 
80 
85  vtkSetMacro(OutputPointsPrecision,int);
86  vtkGetMacro(OutputPointsPrecision,int);
88 
89 protected:
91  ~vtkThresholdPoints() override {}
92 
93  // Usual data generation method
95 
97 
101 
102  int (vtkThresholdPoints::*ThresholdFunction)(double s);
103 
104  int Lower(double s) {return ( s <= this->LowerThreshold ? 1 : 0 );};
105  int Upper(double s) {return ( s >= this->UpperThreshold ? 1 : 0 );};
106  int Between(double s) {return ( s >= this->LowerThreshold ?
107  ( s <= this->UpperThreshold ? 1 : 0 ) : 0 );};
108 private:
109  vtkThresholdPoints(const vtkThresholdPoints&) = delete;
110  void operator=(const vtkThresholdPoints&) = delete;
111 };
112 
113 #endif
vtkThresholdPoints::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkThresholdPoints.h:100
vtkThresholdPoints::~vtkThresholdPoints
~vtkThresholdPoints() override
Definition: vtkThresholdPoints.h:91
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkThresholdPoints::Lower
int Lower(double s)
Definition: vtkThresholdPoints.h:104
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkThresholdPoints::Between
int Between(double s)
Definition: vtkThresholdPoints.h:106
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkThresholdPoints::UpperThreshold
double UpperThreshold
Definition: vtkThresholdPoints.h:99
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkThresholdPoints
extracts points whose scalar value satisfies threshold criterion
Definition: vtkThresholdPoints.h:40
vtkThresholdPoints::LowerThreshold
double LowerThreshold
Definition: vtkThresholdPoints.h:98
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkThresholdPoints::Upper
int Upper(double s)
Definition: vtkThresholdPoints.h:105
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
int
int
Definition: vtkVectorOperators.h:164
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44