VTK  9.2.6
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
28#ifndef vtkThresholdPoints_h
29#define vtkThresholdPoints_h
30
31#include "vtkFiltersCoreModule.h" // For export macro
33
34class VTKFILTERSCORE_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 void ThresholdByLower(double lower);
45
49 void ThresholdByUpper(double upper);
50
55 void ThresholdBetween(double lower, double upper);
56
58
61 vtkSetMacro(UpperThreshold, double);
62 vtkGetMacro(UpperThreshold, double);
64
66
69 vtkSetMacro(LowerThreshold, double);
70 vtkGetMacro(LowerThreshold, double);
72
74
78 vtkSetMacro(InputArrayComponent, int);
79 vtkGetMacro(InputArrayComponent, int);
81
83
88 vtkSetMacro(OutputPointsPrecision, int);
89 vtkGetMacro(OutputPointsPrecision, int);
91
92protected:
94 ~vtkThresholdPoints() override = default;
95
96 // Usual data generation method
98
99 int FillInputPortInformation(int port, vtkInformation* info) override;
100
105
107
108 int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
109 int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
110 int Between(double s)
111 {
112 return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
113 }
114
115private:
116 vtkThresholdPoints(const vtkThresholdPoints&) = delete;
117 void operator=(const vtkThresholdPoints&) = delete;
118};
119
120#endif
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
extracts points whose scalar value satisfies threshold criterion
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ThresholdByLower(double lower)
Criterion is cells whose scalars are less or equal to lower threshold.
~vtkThresholdPoints() override=default
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int(vtkThresholdPoints::* ThresholdFunction)(double s)
void ThresholdBetween(double lower, double upper)
Criterion is cells whose scalars are between lower and upper thresholds (inclusive of the end values)...
static vtkThresholdPoints * New()
void ThresholdByUpper(double upper)
Criterion is cells whose scalars are greater or equal to upper threshold.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.