itasc.contact_analysis.dynamics.trajectories¶
Tracked label stack → per-track centroid trajectories (µm), gaps preserved.
The shared front end of every dynamics calculation. Runs
skimage.measure.regionprops() over each frame of a tracked label stack
(label == track_id, constant across frames — the same per-frame loop the
shape core uses) and groups centroids into one trajectory per track id. Frames
where a track’s label is absent are simply missing from its series, so a
Trajectory carries an explicit frames array and downstream code can
detect gaps (diff(frames) > 1).
Centroids are returned in µm ((x, y) = (col, row) · pixel_size_um);
x is the column axis and y the row axis, matching the shape core’s
centroid_x_um / centroid_y_um. Backend-only (no Qt / napari).
Functions
|
Read a tracked label TIFF and return one |
|
|
Classes
|
One track's centroid path in µm, in frame order. |
- class itasc.contact_analysis.dynamics.trajectories.Trajectory(track_id, frames, xy)[source]¶
Bases:
objectOne track’s centroid path in µm, in frame order.
framesis strictly increasing (one entry per frame the track is present);xyis the matching(N, 2)array of(x_um, y_um)centroids. A jump of more than 1 between consecutiveframesis a gap.
- itasc.contact_analysis.dynamics.trajectories.extract_trajectories(label_path, *, pixel_size_um, progress_cb=None)[source]¶
Read a tracked label TIFF and return one
Trajectoryper track id.Centroids come from
regionprops(frame).centroid(row, col) scaled by pixel_size_um into(x_um, y_um). Trajectories are sorted by track id; each is internally sorted by frame.
- itasc.contact_analysis.dynamics.trajectories.trajectories_from_stack(label_stack, *, pixel_size_um, progress_cb=None)[source]¶
extract_trajectories()over an in-memoryT×Y×Xlabel stack.