Dataset2htg
The principle of the filter is to subdivide input data
from a vtkDataSet
following a subdivision strategy.
This commit implements the algorithm from figure 8 of:
ADR Visualization: A Generalized Framework for Ranking Large-Scale Scientific Data using Analysis-Driven Refinement
authors: Boonthanome Nouanesengsy, Jonathan Woodring, John Patchett, Kary Myers, James Ahrens
The main problem with this algorithm is that it is bottom-up, while hyper tree grids need top-down strategies in order to be able to index each position in the hyper tree grid correctly.
To alleviate this issue, we create a "fake" hyper tree grid without
all the indexing properties and the cursors. We build it as a grid
of multi-resolution sparse grids stored as std::unordered_map
.
This is so we do not allocate all the grid. This allows to set rather
high MaxDepth
parameter for the hyper tree grid while having a small
memory footprint.
This grid of multi-resolution sparse grids is filled bottom-up with all
the information required, and then we construct the vtkHyperTreeGrid
with a top-down recursive algorithm.
Leaves of the hyper tree grid are subdivided following a metric /
strategy. A quantity is calculated over all the element of each subtree.
In order to avoid calculating the same quantity several times, those
measurement are pointer that should inherit from
vtkAbstractArrayMeasurement
. The measure is carried from the bottom to
the top by merging sub vtkAbstractArrayMeasurement
objects.
A few measurement methods are implemented in this commit.
Fixes #19213 (closed)