VTK  9.5.20250902
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
128#ifndef vtkThresholdPoints_h
129#define vtkThresholdPoints_h
130
131#include "vtkFiltersCoreModule.h" // For export macro
132#include "vtkPolyDataAlgorithm.h"
133#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
134
135VTK_ABI_NAMESPACE_BEGIN
136class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkThresholdPoints : public vtkPolyDataAlgorithm
137{
138public:
141 void PrintSelf(ostream& os, vtkIndent indent) override;
142
146 void ThresholdByLower(double lower);
147
151 void ThresholdByUpper(double upper);
152
157 void ThresholdBetween(double lower, double upper);
158
160
163 vtkSetMacro(UpperThreshold, double);
164 vtkGetMacro(UpperThreshold, double);
166
168
171 vtkSetMacro(LowerThreshold, double);
172 vtkGetMacro(LowerThreshold, double);
174
176
180 vtkSetMacro(InputArrayComponent, int);
181 vtkGetMacro(InputArrayComponent, int);
183
185
190 vtkSetMacro(OutputPointsPrecision, int);
191 vtkGetMacro(OutputPointsPrecision, int);
193
194protected:
196 ~vtkThresholdPoints() override = default;
197
198 // Usual data generation method
200
201 int FillInputPortInformation(int port, vtkInformation* info) override;
202
207
208 int (vtkThresholdPoints::*ThresholdFunction)(double s);
209
210 int Lower(double s) { return (s <= this->LowerThreshold ? 1 : 0); }
211 int Upper(double s) { return (s >= this->UpperThreshold ? 1 : 0); }
212 int Between(double s)
213 {
214 return (s >= this->LowerThreshold ? (s <= this->UpperThreshold ? 1 : 0) : 0);
215 }
216
217private:
218 vtkThresholdPoints(const vtkThresholdPoints&) = delete;
219 void operator=(const vtkThresholdPoints&) = delete;
220};
221
222VTK_ABI_NAMESPACE_END
223#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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.
#define VTK_MARSHALAUTO