VTK  9.2.6
vtkHyperTreeGridPreConfiguredSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridPreConfiguredSource.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 copyrgight notice for more information.
13 
14 =========================================================================*/
15 
26 #include "vtkFiltersSourcesModule.h" //for export macro
28 
29 #ifndef vtkHyperTreeGridPreConfiguredSource_h
30 #define vtkHyperTreeGridPreConfiguredSource_h
31 
32 class vtkHyperTreeGrid;
34 class vtkDoubleArray;
35 
36 class VTKFILTERSSOURCES_EXPORT vtkHyperTreeGridPreConfiguredSource
38 {
39 public:
45 
47 
50  void GenerateUnbalanced(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
51  unsigned int depth, const std::vector<double>& extent,
52  const std::vector<unsigned int>& subdivisions);
53 
54  void GenerateBalanced(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
55  unsigned int depth, const std::vector<double>& extent,
56  const std::vector<unsigned int>& subdivisions);
58 
60 
63  enum HTGType
64  {
71  CUSTOM
72  };
74 
76 
80  {
82  BALANCED
83  };
85 
89  vtkGetEnumMacro(HTGMode, HTGType);
90  vtkSetEnumMacro(HTGMode, HTGType);
91 
93 
96  vtkGetEnumMacro(CustomArchitecture, HTGArchitecture);
97  vtkSetEnumMacro(CustomArchitecture, HTGArchitecture);
98 
102  vtkGetMacro(CustomDim, unsigned int);
103  vtkSetMacro(CustomDim, unsigned int);
104 
108  vtkGetMacro(CustomFactor, unsigned int);
109  vtkSetMacro(CustomFactor, unsigned int);
110 
114  vtkGetMacro(CustomDepth, unsigned int);
115  vtkSetMacro(CustomDepth, unsigned int);
116 
120  vtkGetVector6Macro(CustomExtent, double);
121  vtkSetVector6Macro(CustomExtent, double);
122 
126  vtkGetVector3Macro(CustomSubdivisions, unsigned int);
127  vtkSetVector3Macro(CustomSubdivisions, unsigned int);
129 
131 
134  void GenerateUnbalanced3DepthQuadTree2x3(vtkHyperTreeGrid* HTG);
135 
136  void GenerateBalanced3DepthQuadTree2x3(vtkHyperTreeGrid* HTG);
137 
138  void GenerateUnbalanced2Depth3BranchTree3x3(vtkHyperTreeGrid* HTG);
139 
140  void GenerateBalanced4Depth3BranchTree2x2(vtkHyperTreeGrid* HTG);
141 
142  void GenerateUnbalanced3DepthOctTree3x2x3(vtkHyperTreeGrid* HTG);
143 
144  void GenerateBalanced2Depth3BranchTree3x3x2(vtkHyperTreeGrid* HTG);
145 
146  int GenerateCustom(vtkHyperTreeGrid* HTG);
148 
149 protected:
154  virtual ~vtkHyperTreeGridPreConfiguredSource() = default;
156 
157  void operator=(const vtkHyperTreeGridPreConfiguredSource&) = delete;
158 
159  int FillOutputPortInformation(int, vtkInformation*) override;
160 
163 
165 
167 
170  void Preprocess(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
171  const std::vector<double>& extent, const std::vector<unsigned int>& subdivisions);
172 
176  void RecurseBalanced(
177  vtkHyperTreeGridNonOrientedCursor* cursor, vtkDoubleArray* levels, const int maxDepth);
179 
181 
185 
190  unsigned int CustomDim;
191  unsigned int CustomFactor;
192  unsigned int CustomDepth;
193  double CustomExtent[6];
194  unsigned int CustomSubdivisions[3];
196 
197 }; // vtkHyperTreeGridPreConfiguredSource
198 
199 #endif // vtkHyperTreeGridPreConfiguredSource_h
unsigned int CustomDim
The pre-configuration mode of the generator.
HTGArchitecture CustomArchitecture
All members related to the CUSTOM HTGType.
HTGType HTGMode
The pre-configuration mode of the generator.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
Store vtkAlgorithm input/output information.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Helper class for generating a curated set of HyperTree Grids (HTGs) for testing purposes.
HTGType
An enum type for referencing preconfigured HTGs.
Objects for traversal a HyperTreeGrid.
dynamic, self-adjusting array of double
unsigned int CustomFactor
The pre-configuration mode of the generator.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce a hyper tree grid as output.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:65
HTGArchitecture
An enum type for configuring the type of generation for the CUSTOM HTG type.
unsigned int CustomDepth
The pre-configuration mode of the generator.
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...