VTK  9.7.20260724
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
127
128#ifndef vtkThresholdPoints_h
129#define vtkThresholdPoints_h
130
131#include "vtkDeprecation.h"
132#include "vtkFiltersCoreModule.h" // For export macro
133#include "vtkPolyDataAlgorithm.h"
134#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
135
136VTK_ABI_NAMESPACE_BEGIN
137class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkThresholdPoints : public vtkPolyDataAlgorithm
138{
139public:
142 void PrintSelf(ostream& os, vtkIndent indent) override;
143
156
158
161 void SetThresholdFunction(int function);
164
166
170 vtkSetMacro(UpperThreshold, double);
171 vtkGetMacro(UpperThreshold, double);
172 vtkSetMacro(LowerThreshold, double);
173 vtkGetMacro(LowerThreshold, double);
175
177
181 vtkSetMacro(InputArrayComponent, int);
182 vtkGetMacro(InputArrayComponent, int);
184
186
191 vtkSetMacro(OutputPointsPrecision, int);
192 vtkGetMacro(OutputPointsPrecision, int);
194
195protected:
197 ~vtkThresholdPoints() override = default;
198
199 // Usual data generation method
201
202 int FillInputPortInformation(int port, vtkInformation* info) override;
203
204 double LowerThreshold = -std::numeric_limits<double>::infinity();
205 double UpperThreshold = std::numeric_limits<double>::infinity();
208
210
211 int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
212 int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
213 int Between(double s)
214 {
215 return ((s >= this->LowerThreshold && s <= this->UpperThreshold) ? 1 : 0);
216 }
217
218private:
219 vtkThresholdPoints(const vtkThresholdPoints&) = delete;
220 void operator=(const vtkThresholdPoints&) = delete;
221};
222
223VTK_ABI_NAMESPACE_END
224#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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.
~vtkThresholdPoints() override=default
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int(vtkThresholdPoints::* ThresholdFunction)(double s)
static vtkThresholdPoints * New()
int GetThresholdFunction()
Set/Get the threshold method.
void SetThresholdFunction(int function)
Set/Get the threshold method.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
ThresholdType
Possible values for the threshold function:
#define VTK_MARSHALAUTO