itasc.segmentation.lineage

Backward-compatible shim.

The lineage swimlane model is shared substrate (used by the correction lineage panel, which is part of the independently-installable tracking/correction piece), so it now lives in itasc.core.lineage. This re-export keeps the historic itasc.segmentation.lineage import path working for the full orchestrator and any out-of-repo consumers.

class itasc.segmentation.lineage.LineageModel(n_frames, lanes)[source]

Bases: object

All track lanes plus the total frame count, for the lineage panel.

Parameters:
n_frames: int
lanes: tuple[TrackLane, ...]
lane_for(cell_id)[source]
Return type:

TrackLane | None

Parameters:

cell_id (int)

class itasc.segmentation.lineage.TrackLane(cell_id, segments)[source]

Bases: object

One track id and the frame segments where it is present.

Parameters:
cell_id: int
segments: tuple[TrackSegment, ...]
property first_frame: int
property last_frame: int
property n_frames: int
property has_gap: bool
class itasc.segmentation.lineage.TrackSegment(start, end)[source]

Bases: object

A contiguous run of frames [start, end] (inclusive) for one track.

Parameters:
start: int
end: int
property length: int
itasc.segmentation.lineage.build_lineage(tracked)[source]

Build a LineageModel from a (T, Y, X) tracked label stack.

A singleton Z axis ((T, 1, Y, X)) is squeezed; a single 2D frame is treated as one timepoint. Lanes are sorted by track id so a cell keeps its row across refreshes; correction actions (retrack, extend, relabel, …) that change a track’s id move it to its new sorted position on the next refresh.

Return type:

LineageModel

Parameters:

tracked (ndarray)