Tracking Post-Processing¶
![]()
Pipeline description¶
This example loads a 2D time-varying scalar field, where time steps are stored as a sequence of data arrays, and tracks its extrema over time with TrackingFromFields. As in the Time Tracking and Tracking From Critical Points examples, each extremum is followed from one time step to the next by solving an optimal assignment problem between the persistence diagrams of consecutive steps, controlled by the persistence threshold and the relative destruction cost. Here, each tracked minimum captures an individual debris fragment ejected by a hypervelocity impact, so that the raw output of the tracking is, for every fragment, the sequence of its positions through the time-space domain.
This example focuses on the post-processing stage of the filter (parameter
Enablepostprocessing), which turns these raw, frame-by-frame tracks into
clean, analyzable trajectories and enriches them with geometric attributes.
In particular, for each time step a merge-tree segmentation (parameter
Computemergetreesegmentation) isolates the region around every tracked
extremum and attaches to each trajectory the surface of its associated
feature, recovering a measure of its size in addition to its position.
The resulting trajectory mesh carries, for each fragment, its linearized
motion model (ax, bx, ay, by), its duration and its surface
statistics. A sequence of Threshold filters then isolates the fragments of
interest — by axial velocity (ax), duration (Duration), critical type
(minima) and spatial region of origin (bx, by) — and two derived plots
summarize the experiment: a crater profile, obtained by binning the impact
positions (by), and an ejection diagram, plotting the ejection angle
atan(ay / -ax) against the axial velocity -ax.
Beyond the two tracking parameters described in the other examples, the
post-processing is mainly tuned through merging and segmentation controls:
increase Maxlinkpx to allow longer reconnections between consecutive
trajectory segments (decrease it to keep only tight, unambiguous links), and
adjust Maxsurfacesize to bound the size of the segmented features (lower it
to discard oversized background regions). Enabling Otsusimplification is
recommended when the features sit on a noisy or slowly-varying background.
ParaView¶
To reproduce the above screenshot, go to your ttk-data directory and enter the following command:
paraview states/trackingPostProcessing.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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
To run the above Python script, go to your ttk-data directory and enter the following command:
pvpython python/trackingPostProcessing.py
Inputs¶
- hvi.vti: 2D time-varying scalar field capturing debris fragments ejected by a hypervelocity impact, with each time step stored as a separate data array.
Outputs¶
debrisTrajectories.vtu: space-time trajectories of the selected debris fragments.crater_profile.csv: debris mass (mg) binned by centered vertical impact position (mm).ejection_angle.csv: ejection angle (°) versus axial velocity (m/s) per fragment.