Merge Tree Temporal Reduction¶
Pipeline description¶
This example first loads an ensemble of scalar fields inside a cinema database from disk. Then, the MergeTree is computed on each scalar field.
All these trees are passed to MergeTreeTemporalReduction to compute a subsampling of a sequence of merge trees. The algorithm greedily removes trees in the sequence that can be accurately reconstructed by the geodesic computation. The remaining trees are called the key frames.
In terms of visualisation, the three key frames trees and two reconstructed trees are visualized with a planar layout along with their corresponding scalar fields.
The python script saves the information needed to reconstruct the trees removed in the sequence.
ParaView¶
To reproduce the above screenshot, go to your ttk-data directory and enter the following command:
paraview states/mergeTreeTemporalReduction.pvsm
Python code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
To run the above Python script, go to your ttk-data directory and enter the following command:
pvpython python/mergeTreeTemporalReduction.py
Inputs¶
- Isabel.cdb: a cinema database containing 12 regular grids.
Outputs¶
ReductionCoefficients.csv
: a table containing information needed to reconstruct removed trees. For each removed tree we have the id of the two key frames needed to reconstruct it ('Index1' and 'Index2'), along with the interpolation parameter ('Alpha').