VTK  9.3.20241006
vtkHyperTreeGridEvaluateCoarse.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
65#ifndef vtkHyperTreeGridEvaluateCoarse_h
66#define vtkHyperTreeGridEvaluateCoarse_h
67
68#include "vtkFiltersHyperTreeModule.h" // For export macro
70
71#include <vector> // For scratch storage.
72
73VTK_ABI_NAMESPACE_BEGIN
74class vtkBitArray;
75
77
79
80class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridEvaluateCoarse : public vtkHyperTreeGridAlgorithm
81{
82public:
83 enum
84 {
85 OPERATOR_DON_T_CHANGE_FAST = 0,
86 OPERATOR_DON_T_CHANGE = 1,
87 OPERATOR_MIN = 2,
88 OPERATOR_MAX = 3,
89 OPERATOR_SUM = 4,
90 OPERATOR_AVERAGE = 5,
91 OPERATOR_UNMASKED_AVERAGE = 6,
92 OPERATOR_ELDER_CHILD = 7,
93 OPERATOR_SPLATTING_AVERAGE = 8
94 };
95
98 void PrintSelf(ostream& os, vtkIndent indent) override;
99
101
104 vtkSetMacro(Operator, unsigned int);
105 vtkGetMacro(Operator, unsigned int);
107
111 vtkSetMacro(Default, double);
112
113protected:
116
121
126
131
132private:
134 void operator=(const vtkHyperTreeGridEvaluateCoarse&) = delete;
135
139 virtual void ProcessNodeNoChange(vtkHyperTreeGridNonOrientedCursor*);
140
145 void ProcessChild(vtkHyperTreeGridNonOrientedCursor* outCursor, int ichild,
146 std::vector<std::vector<double>>& childrenValues);
147
152 virtual double EvalCoarse(const std::vector<double>&);
153
155
158 virtual double Min(const std::vector<double>&);
159 virtual double Max(const std::vector<double>&);
160 virtual double Sum(const std::vector<double>&);
161 virtual double Average(const std::vector<double>&);
162 virtual double UnmaskedAverage(const std::vector<double>&);
163 virtual double ElderChild(const std::vector<double>&);
164 virtual double SplattingAverage(const std::vector<double>&);
166
167 unsigned int Operator = OPERATOR_DON_T_CHANGE;
168 double Default = 0.0;
169 unsigned int SplattingFactor = 1;
170 unsigned int NumberOfChildren = 0;
171 vtkBitArray* Mask = nullptr;
172};
173
174VTK_ABI_NAMESPACE_END
175#endif // vtkHyperTreeGridEvaluateCoarse_h
dynamic, self-adjusting array of bits
Definition vtkBitArray.h:29
general representation of visualization data
Superclass for algorithms that produce a hyper tree grid as output.
The value of the parent cell is determined from an operation defined on the values of the child cells...
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to extract hyper tree grid levels.
virtual void ProcessNode(vtkHyperTreeGridNonOrientedCursor *)
Recursively descend into tree down to leaves.
~vtkHyperTreeGridEvaluateCoarse() override
static vtkHyperTreeGridEvaluateCoarse * New()
Objects for traversal a HyperTreeGrid.
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.