40 #ifndef vtkThreshold_h
41 #define vtkThreshold_h
44 #include "vtkFiltersCoreModule.h"
47 #define VTK_ATTRIBUTE_MODE_DEFAULT 0
48 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
49 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
52 #define VTK_COMPONENT_MODE_USE_SELECTED 0
53 #define VTK_COMPONENT_MODE_USE_ALL 1
54 #define VTK_COMPONENT_MODE_USE_ANY 2
56 VTK_ABI_NAMESPACE_BEGIN
75 THRESHOLD_BETWEEN = 0,
85 void SetThresholdFunction(
int function);
86 int GetThresholdFunction();
94 vtkSetMacro(UpperThreshold,
double);
95 vtkSetMacro(LowerThreshold,
double);
96 vtkGetMacro(UpperThreshold,
double);
97 vtkGetMacro(LowerThreshold,
double);
109 vtkSetMacro(AttributeMode,
int);
112 vtkGetMacro(AttributeMode,
int);
115 void SetAttributeModeToDefault();
118 void SetAttributeModeToUsePointData();
121 void SetAttributeModeToUseCellData();
124 const
char* GetAttributeModeAsString();
137 vtkGetMacro(ComponentMode,
int);
138 void SetComponentModeToUseSelected() { this->SetComponentMode(VTK_COMPONENT_MODE_USE_SELECTED); }
141 const char* GetComponentModeAsString();
149 vtkSetClampMacro(SelectedComponent,
int, 0,
VTK_INT_MAX);
150 vtkGetMacro(SelectedComponent,
int);
176 vtkBooleanMacro(UseContinuousCellRange,
vtkTypeBool);
188 void SetPointsDataTypeToDouble();
191 void SetPointsDataTypeToFloat();
194 void SetPointsDataType(
int type);
197 int GetPointsDataType();
206 vtkSetMacro(Invert,
bool);
207 vtkGetMacro(Invert,
bool);
208 vtkBooleanMacro(Invert,
bool);
217 vtkSetMacro(OutputPointsPrecision,
int);
218 vtkGetMacro(OutputPointsPrecision,
int);
235 int Lower(
double s) const;
236 int Upper(
double s) const;
237 int Between(
double s) const;
241 ~vtkThreshold() override;
246 int FillInputPortInformation(
int port, vtkInformation*
info) override;
248 double LowerThreshold;
249 double UpperThreshold;
253 int AttributeMode = -1;
255 int SelectedComponent = 0;
256 int OutputPointsPrecision = DEFAULT_PRECISION;
258 int (vtkThreshold::*ThresholdFunction)(
double s) const = &vtkThreshold::Between;
260 template <typename TScalarArray>
262 struct EvaluateCellsWorker;
264 template <typename TScalarsArray>
265 int EvaluateComponents(TScalarsArray& scalars,
vtkIdType id);
266 template <typename TScalarsArray>
267 int EvaluateCell(TScalarsArray& scalars, const
vtkIdType* cellPts,
vtkIdType numCellPts);
268 template <typename TScalarsArray>
269 int EvaluateCell(TScalarsArray& scalars,
int c, const
vtkIdType* cellPts,
vtkIdType numCellPts);
272 vtkThreshold(const vtkThreshold&) = delete;
273 void operator=(const vtkThreshold&) = delete;
275 int NumberOfComponents;
278 VTK_ABI_NAMESPACE_END
static vtkUnstructuredGridAlgorithm * New()
extracts cells where scalar value in cell satisfies threshold criterion
#define VTK_DEPRECATED_IN_9_3_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
#define VTK_COMPONENT_MODE_USE_SELECTED
list of point or cell ids
abstract superclass for arrays of numeric data
#define VTK_COMPONENT_MODE_USE_ALL
Superclass for algorithms that produce only unstructured grid as output.
void SetComponentModeToUseAll()
Control how the decision of in / out is made with multi-component data.
#define VTK_COMPONENT_MODE_USE_ANY
ThresholdType
Possible values for the threshold function:
void SetComponentModeToUseAny()
Control how the decision of in / out is made with multi-component data.