VTK  9.3.20240424
vtkHyperTreeGridThreshold.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
30#ifndef vtkHyperTreeGridThreshold_h
31#define vtkHyperTreeGridThreshold_h
32
33#include "vtkDeprecation.h" // For deprecation macros
34#include "vtkFiltersHyperTreeModule.h" // For export macro
36
37#include <memory> // For std::unique_ptr
38
39VTK_ABI_NAMESPACE_BEGIN
40class vtkBitArray;
42
44
45class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridThreshold : public vtkHyperTreeGridAlgorithm
46{
47public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
53
59 VTK_DEPRECATED_IN_9_3_0("JustCreateNewMask is deprecated in favor of MemoryStrategy")
60 virtual void SetJustCreateNewMask(bool) {}
61 VTK_DEPRECATED_IN_9_3_0("JustCreateNewMask is deprecated in favor of MemoryStrategy")
62 virtual bool GetJustCreateNewMask() { return (this->GetMemoryStrategy() == MaskInput); }
64
66
69 vtkSetMacro(LowerThreshold, double);
70 vtkGetMacro(LowerThreshold, double);
72
74
77 vtkSetMacro(UpperThreshold, double);
78 vtkGetMacro(UpperThreshold, double);
80
84 void ThresholdBetween(double, double);
85
87
96 {
97 MaskInput = 0,
98 CopyStructureAndIndexArrays = 1,
99 DeepThreshold = 2
100 };
106 vtkGetMacro(MemoryStrategy, int);
107 vtkSetClampMacro(MemoryStrategy, int, MaskInput, DeepThreshold);
109
110protected:
113
118
123
130
135
140
145
150
155
160
165
166private:
168 void operator=(const vtkHyperTreeGridThreshold&) = delete;
169
173 int MemoryStrategy = MaskInput;
174
175 struct Internals;
176 std::unique_ptr<Internals> Internal;
177};
178
179VTK_ABI_NAMESPACE_END
180#endif /* vtkHyperTreeGridThreshold */
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:29
abstract superclass for arrays of numeric data
general representation of visualization data
Superclass for algorithms that produce a hyper tree grid as output.
Objects for traversal a HyperTreeGrid.
Extract cells from a hyper tree grid where selected scalar value is within given range.
vtkIdType CurrentId
Keep track of current index in output hyper tree grid.
bool RecursivelyProcessTree(vtkHyperTreeGridNonOrientedCursor *, vtkHyperTreeGridNonOrientedCursor *)
Recursively descend into tree down to leaves.
static vtkHyperTreeGridThreshold * New()
double LowerThreshold
LowerThreshold scalar value to be accepted.
vtkBitArray * InMask
Input material mask.
MemoryStrategyChoice
Enum for defining the strategy to take in allocating the memory used by the output.
~vtkHyperTreeGridThreshold() override
int FillOutputPortInformation(int, vtkInformation *) override
For this algorithm the output is a vtkHyperTreeGrid instance.
bool JustCreateNewMask
With or without copy (deprecated in favor of MemoryStrategy)
vtkBitArray * OutMask
Output material mask constructed by this filter.
bool RecursivelyProcessTreeWithCreateNewMask(vtkHyperTreeGridNonOrientedCursor *)
double UpperThreshold
UpperThreshold scalar value to be accepted.
vtkDataArray * InScalars
Keep track of selected input scalars.
void ThresholdBetween(double, double)
Convenience method to set both threshold values at once.
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to extract cells based on thresholded value.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition vtkType.h:315