10BC0 use LITT function to determine order of tracks, by AnniekStok · Pull Request #266 · funkelab/motile_tracker · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@AnniekStok
Copy link
Collaborator
@AnniekStok AnniekStok commented Nov 6, 2025

Also optionally supply the previous order, to minimize tracks jumping to the end of the tree.
The get_sorted_tracks function needed to be adjusted to iterate over the nodes by topological order (using nx.topological_sort(graph)), because when deleting an entire track, and undoing that action, the nodes are added back in reverse order, and because of that the parent tracklet is not correctly determined.

This PR should also fix a bug I just discovered on Main: when you delete an entire lineage, except for one node, the application freezes on calculating the tree 😬

…optionally supply the previous order, so minimize tracks jumping to the end of the tree
[tid for tid, ptid in tracklet_to_parent_tracklet.items() if ptid == 0]
)

# Optionally sort roots according to their position in prev_axis_order
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this functionality in the LITT implementation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to using nx.topological_sort? I think we definitely should, otherwise it is kind of broken if your node order is not 'correct'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I suppose we can also add the prev_axis_order but that may be more application specific)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the prev_axis_order, I think it would be applicable to anyone who is editing tracks

@cmalinmayor cmalinmayor merged commit 19249d4 into main Nov 10, 2025
13 checks passed
@cmalinmayor cmalinmayor deleted the 260-use-new-function-from-litt-to-get-order-of-tracklets branch December 19, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0