VTK  9.0.1
vtkHyperTreeGridEvaluateCoarse.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridEvaluateCoarse.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
74 #ifndef vtkHyperTreeGridEvaluateCoarse_h
75 #define vtkHyperTreeGridEvaluateCoarse_h
76 
77 #include "vtkFiltersHyperTreeModule.h" // For export macro
79 
80 #include <vector> // For scratch storage.
81 
82 class vtkBitArray;
83 
84 class vtkHyperTreeGrid;
85 
87 
88 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridEvaluateCoarse : public vtkHyperTreeGridAlgorithm
89 {
90 public:
91  enum
92  {
93  OPERATOR_DON_T_CHANGE_FAST = 0,
94  OPERATOR_DON_T_CHANGE = 1,
95  OPERATOR_MIN = 2,
96  OPERATOR_MAX = 3,
97  OPERATOR_SUM = 4,
98  OPERATOR_AVERAGE = 5,
99  OPERATOR_UNMASKED_AVERAGE = 6,
100  OPERATOR_ELDER_CHILD = 7,
101  OPERATOR_SPLATTING_AVERAGE = 8
102  };
103 
106  void PrintSelf(ostream&, vtkIndent) override;
107 
109 
112  vtkSetMacro(Operator, unsigned int);
113  vtkGetMacro(Operator, unsigned int);
115 
117 
120  vtkSetMacro(Default, double);
122 
123 protected:
125  ~vtkHyperTreeGridEvaluateCoarse() override;
126 
131 
133 
136  int FillOutputPortInformation(int, vtkInformation*) override;
138 
142  virtual void ProcessNode(vtkHyperTreeGridNonOrientedCursor*);
143 
144 private:
146  void operator=(const vtkHyperTreeGridEvaluateCoarse&) = delete;
147 
149 
152  virtual double EvalCoarse(const std::vector<double>&);
153 
154  virtual double Min(const std::vector<double>&);
155  virtual double Max(const std::vector<double>&);
156  virtual double Sum(const std::vector<double>&);
157  virtual double Average(const std::vector<double>&);
158  virtual double UnmaskedAverage(const std::vector<double>&);
159  virtual double ElderChild(const std::vector<double>&);
160  virtual double SplattingAverage(const std::vector<double>&);
162 
163  int NbChilds;
164  unsigned int Operator;
165 
166  double Default;
167 
168  unsigned int BranchFactor;
169  unsigned int Dimension;
170  unsigned int SplattingFactor;
171 
172  unsigned int NumberOfChildren;
173 
174  vtkBitArray* Mask;
175 };
176 
177 #endif // vtkHyperTreeGridEvaluateCoarse_h
vtkHyperTreeGridAlgorithm::ProcessTrees
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:50
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:47
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:96
vtkHyperTreeGridEvaluateCoarse
The value of the parent cell is determined from an operation defined on the values of the child cells...
Definition: vtkHyperTreeGridEvaluateCoarse.h:88