Open cmalinmayor opened 4 months ago
Outcome of discussion: The user can define groups of nodes, tracks, or lineages. Each group has a user defined name. Groups are stored in a dictionary in the Tracks object (probably), and potentially group names are also attributes (but this may not be necessary). "Pinned" or edited can be a group that is automatically created when the user edits. There could also be a "selection" group created automatically.
There are 3 types of group:
There will be a tab in the right hand UI showing the current groups and allowing the user to create a new group, or delete a group (similar to the TracksList). Each group will show summary statistics (group type, number of nodes/tracks/lineages) in the list. Clicking on the group will update the "current" group, and allow the option in the "all"/"selected lineage"/"group" menu to only show things in the group (implemented for lineages already, needs some implementation for the other types of group) (note: maybe we don't need lineage anymore?). You can also save the group the same way you can save a tracks object (zeros out segmentation for nodes not in group). You can add selected nodes to the "current" group with a button/keybind (they are automatically added to the selection group).
P.S. For implementing the node group display. There is an issue with displaying only certain nodes from a track, because the napari layer doesn't let you set the colormap differently in different time points. A permanent solution would be to separate the Tracks.segmentation and the napari layer.data into different objects, and then the layer could actually put zeros in the time points it doesn't want ot be visible. A temporary solution would be what Anniek was doing to update the transparency of the colormap at every change of timepoint to hide tracks that don't have nodes in the current time point.
Ideas for groups that are automatically generated and updated:
Features on the Tracks, and then a separate Groups object in the data views part of the code. (No longer a dictionary on the Tracks)
We discussed giving the user the ability to define a subset of nodes/edges/tracks/lineages separate from (more persistent than) selection. This will be useful for visualizing only cells of interest to reduce visual clutter, setting attributes, and eliminating annoying issues with using selection to determine what is viewed when editing changes the selection. We can also re-use the UI to show subsets that are defined by attributes (e.g. pins, divisions)