Closed tinevez closed 5 months ago
Hi @tinevez, thanks for the PR, this looks great. I just made some tiny edits to ensure consistency with existing code.
I have one question: How would TrackMate read a node that is not connected to any edges? Could be a cell that appears for one frame, at the border, and disappears again. In the current table we would not capture this, right?
Humbly, I would suggest keeping the original method name (edges_to_csv
): TrackMate will make something special to read this output, but it is bespoke to the trackastra integration.
For your question: yes 'lonely' spots would not appear in the table, but we do not mind. Lonely spots are added to the model at the detection part (before we call trackastra), so they will be in the final data anyway. Here the important part are the edges.
Humbly, I would suggest keeping the original method name (
edges_to_csv
): TrackMate will make something special to read this output, but it is bespoke to the trackastra integration.I see, thanks for the clarification. Then I would suggest
graph_to_edge_table
as a name.For your question: yes 'lonely' spots would not appear in the table, but we do not mind. Lonely spots are added to the model at the detection part (before we call trackastra), so they will be in the final data anyway. Here the important part are the edges.
I'm confused now how a tracker could prune spots that it does not want to pick. I would somehow have to mark each spot as picked or not picked, right?
Btw, I just saw the demo you made, I love it 😍
No need to mark them. Spots are just vertices of a graph. When they have no edges, they are not part of a track, but they are still part of the graph. Or do I not understand the question correctly?
A tracker could get rid of certain spots with no edges, while keeping others, right? For example based on some intensity feature of the spot etc.
It is an edge case anyhow, might not be super important right now.
This PR adds methods to export from trackastra to facilitate its integration in other platforms.