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

Continue track point button and other new features #127

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

AnniekStok
Copy link
Collaborator

@AnniekStok AnniekStok commented Jan 30, 2025

This branch contains several new features originally put together to customize the plugin to help a colleague with his use case. The new features include:

  • A now (hopefully) bug free version of the 3D orthogonal views and 3D clipping plane views with following functionalities:
    orthogonal views:

    • syncing of the layer mode (brush/fill/pipet/navigate/select/add etc)
    • syncing of the layer data and addition/moving new points by clicking/dragging (if no TrackLabels are present)
    • syncing visibility of nodes
    • syncing node color aesthetics (colormap highlights, border color, size)
    • syncing selected_label
    • syncing redo/undo
    • syncing selecting nodes by clicking
    • optional cross widget that centers on the selected node

    clipping planes:

    • define a clipping plane range with a QRangeSlider on an Image or Labels layer
    • if there are tracks, the visible nodes in the TrackLabels and PointLabels will be filtered according to the clipping range specified on the layer in the dropdown.
  • a radiobutton group to choose between 'continue tracks' vs 'start new tracks' when tracking with points (only visible if there is no TrackLabels together with TrackPoints).

  • simplified treewidget range updates: when updating the selection, it checks if all those nodes are still in view. If not, autoRange() is called (instead of setting a customized range for the selected nodes, which is often zoomed in too far and not helpful).

  • If you click outside a label or point in the TrackLabels or TrackPoints layer, the selected_nodes are reset.

  • when you export to CSV, the node color and lineage are also included. The lineage_id is defined as the track_id of the earliest known predecessor (using the get_lineage_id function in SolutionTracks).

Note: in order to filter nodes in the clipping planes, I used the tracks_df dataframe that was originally on the treewidget. Instead, I moved it to the tracks_viewer in order to be able to use it elsewhere. Also, I needed a reference to the tracks_viewer in the run_viewer to be able to pass on the colormap when exporting to CSV.

I am keeping it in this draft pull request until we have settled on which of these features should go to main, and then I can add them separately.

…bute anything and is complicated to keep in sync
…g tracks vs starting a new track when adding a new node with a point
…(intersection between display mode all vs lineage and visibility in the plane sliders)
…tute for TrackGraph layers in the orthogonal views, to make sure the layer indices in the orthogonal views always match with those of the main viewer
…ing to a node, so that the cross widget (if present) can update its location
…ifferent viewer models in the orthogonal views
… select/deselect nodes. When dragged however, do not alter the selection, as this is likely aiming to adjust the viewer angle when in 3D mode
… people first open images and then the plugin
…ansparency of 0 after hiding/showing the cross) and use line vector style
…r visible nodes in the TrackPoints layer when no TrackLabels layer is present to retrieve tracksviewer from
…up only in the case there is a trackpoints layer without a tracklabels layer in the tracksviewer
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.

1 participant