VTK  9.3.0
vtkThresholdPoints.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
28#ifndef vtkThresholdPoints_h
29#define vtkThresholdPoints_h
30
31#include "vtkFiltersCoreModule.h" // For export macro
33
34VTK_ABI_NAMESPACE_BEGIN
35class VTKFILTERSCORE_EXPORT vtkThresholdPoints : public vtkPolyDataAlgorithm
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
45 void ThresholdByLower(double lower);
46
50 void ThresholdByUpper(double upper);
51
56 void ThresholdBetween(double lower, double upper);
57
59
62 vtkSetMacro(UpperThreshold, double);
63 vtkGetMacro(UpperThreshold, double);
65
67
70 vtkSetMacro(LowerThreshold, double);
71 vtkGetMacro(LowerThreshold, double);
73
75
79 vtkSetMacro(InputArrayComponent, int);
80 vtkGetMacro(InputArrayComponent, int);
82
84
89 vtkSetMacro(OutputPointsPrecision, int);
90 vtkGetMacro(OutputPointsPrecision, int);
92
93protected:
95 ~vtkThresholdPoints() override = default;
96
97 // Usual data generation method
99
100 int FillInputPortInformation(int port, vtkInformation* info) override;
101
106
107 int (vtkThresholdPoints::*ThresholdFunction)(double s);
108
109 int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
110 int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
111 int Between(double s)
112 {
113 return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
114 }
115
116private:
117 vtkThresholdPoints(const vtkThresholdPoints&) = delete;
118 void operator=(const vtkThresholdPoints&) = delete;
119};
120
121VTK_ABI_NAMESPACE_END
122#endif
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
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.
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.