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 
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 
135 
137 
139 
141 
143 
145 
148 
149 protected:
156 
158 
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 
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
general representation of visualization data
dynamic, self-adjusting array of double
Superclass for algorithms that produce a hyper tree grid as output.
Objects for traversal a HyperTreeGrid.
Helper class for generating a curated set of HyperTree Grids (HTGs) for testing purposes.
virtual ~vtkHyperTreeGridPreConfiguredSource()=default
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void operator=(const vtkHyperTreeGridPreConfiguredSource &)=delete
vtkSetEnumMacro(CustomArchitecture, HTGArchitecture)
Get/Set for custom architecture.
HTGType
An enum type for referencing preconfigured HTGs.
unsigned int CustomFactor
The pre-configuration mode of the generator.
HTGType HTGMode
The pre-configuration mode of the generator.
vtkGetEnumMacro(CustomArchitecture, HTGArchitecture)
Get/Set for custom architecture.
void GenerateUnbalanced3DepthQuadTree2x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
HTGArchitecture
An enum type for configuring the type of generation for the CUSTOM HTG type.
void GenerateBalanced2Depth3BranchTree3x3x2(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
void GenerateBalanced3DepthQuadTree2x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
void RecurseBalanced(vtkHyperTreeGridNonOrientedCursor *cursor, vtkDoubleArray *levels, const int maxDepth)
Recursive helper for the BALANCED architecture.
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
static vtkHyperTreeGridPreConfiguredSource * New()
void Preprocess(vtkHyperTreeGrid *HTG, unsigned int dim, unsigned int factor, const std::vector< double > &extent, const std::vector< unsigned int > &subdivisions)
Common preprocessing for setting up the HyperTreeGrid for all types.
void GenerateBalanced4Depth3BranchTree2x2(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
HTGArchitecture CustomArchitecture
All members related to the CUSTOM HTGType.
void GenerateUnbalanced3DepthOctTree3x2x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
int GenerateCustom(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
void GenerateUnbalanced2Depth3BranchTree3x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkHyperTreeGridPreConfiguredSource(const vtkHyperTreeGridPreConfiguredSource &)=delete
vtkGetEnumMacro(HTGMode, HTGType)
Get/Set HyperTreeGrid mode.
unsigned int CustomDepth
The pre-configuration mode of the generator.
unsigned int CustomDim
The pre-configuration mode of the generator.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
vtkHyperTreeGridPreConfiguredSource()
Contructor setup.
void GenerateUnbalanced(vtkHyperTreeGrid *HTG, unsigned int dim, unsigned int factor, unsigned int depth, const std::vector< double > &extent, const std::vector< unsigned int > &subdivisions)
Helper methods for generating HTGs.
void GenerateBalanced(vtkHyperTreeGrid *HTG, unsigned int dim, unsigned int factor, unsigned int depth, const std::vector< double > &extent, const std::vector< unsigned int > &subdivisions)
Helper methods for generating HTGs.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ extent
Definition: vtkX3D.h:351