funkelab / motile_tracker

A napari plugin for tracking with motile
https://funkelab.github.io/motile_tracker
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

User defined subsets (separate from selection) #55

Open cmalinmayor opened 5 months ago

cmalinmayor commented 5 months ago

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)

cmalinmayor commented 2 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.

AnniekStok commented 3 weeks ago

Ideas for groups that are automatically generated and updated:

cmalinmayor commented 3 weeks ago

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)

cmalinmayor commented 3 weeks ago
Screenshot 2024-11-06 at 11 21 33 AM