Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User defined subsets (separate from selection) #55

Open
cmalinmayor opened this issue Jul 3, 2024 · 4 comments
Open

User defined subsets (separate from selection) #55

cmalinmayor opened this issue Jul 3, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@cmalinmayor
Copy link
Collaborator

cmalinmayor commented Jul 3, 2024

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 cmalinmayor changed the title Select visible objects widget User defined subsets (separate from selection) Oct 1, 2024
@cmalinmayor cmalinmayor added the enhancement New feature or request label Oct 1, 2024
@cmalinmayor
Copy link
Collaborator Author

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:

  • Lineage group - defined by a set of nodes, where each node is the earliest node in a lineage. (Note: need to update the start node if delete the first node or add a new first node) * this is easiest to start with, we think
  • Track group - defined by a set of nodes, where each node is the earliest node in a track. (Note: need to update the node if delete the first node or add a new first node). Alternatively, we could just list the track ids that are included in the group (and check if we deleted the whole track). (note Add more sample data #2: recoloring a whole track removes it from the group, because you delete the nodes and create new ones).
  • Node group - defined by a set of nodes. Edges with both endpoints in the set are included. (Note: need to delete nodes here when they are deleted from the UI).

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
Copy link
Collaborator

Ideas for groups that are automatically generated and updated:

  • current selection (we have this already)
  • edits/pins (as mentioned above)
  • lineages visible in the current field of view of the data (it might be nice if zooming in on the sample will also automatically hide the elements in the tree that are outside the view, especially when you have data with many objects).

@cmalinmayor
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Screenshot 2024-11-06 at 11 21 33 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants