8000 Basic contour label implementation by AnniekStok · Pull Request #284 · funkelab/motile_tracker · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@AnniekStok
10000
Copy link
Collaborator

Implement option for displaying nodes that are not in lineage/group as contours, instead of hiding them completely. This behavior can be toggled from the Edit Menu (for now, probably should move to 'settings' eventually).
Maybe more as inspiration / intermediate state until we have figured out what we want exactly for the visualization (issues #217 , #283)

image Lineage mode: yellow is in the selected lineage (and is the selected node), therefore it is the only 'filled' label, and it gets a highlight. image Group mode: green & purple are in group and are therefore filled, yellow is selected but not in group, so it gets a highlight (and visible point) but no fill.

…s contours, instead of hiding them completely.
return self._group_labels

@group_labels.setter
def group_labels(self, group_labels: list[int] | None = None) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def group_labels(self, group_labels: list[int] | None = None) -> None:
def group_labels(self, group_labels: list[int] | None = None) -> None:
""" Set the list of nodes that should be filled instead of contoured.... """

return None

if visible == "all":
return 0.6
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a class-level constant and use that, so we can change if needed.

… that is only visible when a TracksLabels layer is present
@AnniekStok
Copy link
Collaborator Author

I added a new tab to expose the opacity and contour settings to the user, and added radio buttons to change the mode, for convenience.

image

Some settings were conflicting in different modes, e.g. we used to have background opacity=0, but then in contour mode we need the background to be visible, so I changed the default to 0.3, so you can see something at the very least.
Also, I disabled changing the background opacity when you are in 'All' mode, because there are no background labels in that case.
The option to 'fill' in contour mode is only displayed when layer.contour > 0, and only available for the foreground and highlighted labels, as it is very inefficient and counterintuitive to 'fill' all labels while in contour mode.

Still not entirely sold on it, let's discuss what potential changes might help.

visualization_widget

@cmalinmayor
Copy link
Collaborator

I pressed D by accident and it created a key error 🙃

Copy link
Collaborator
@cmalinmayor cmalinmayor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug as mentioned when node is deleted while in group. But otherwise I'm happy with the actual contour label changes! Also happy if you want to simplify the USERS options while keeping the backend API fully configurable.

cmalinmayor and others added 4 commits December 19, 2025 11:47
Block selected_label event when setting colormap in _new_label to
prevent infinite recursion loop. Also remove redundant colormap
assignment in _ensure_valid_label since _new_label already handles it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cmalinmayor cmalinmayor marked this pull request as ready for review December 22, 2025 20:44
@cmalinmayor
Copy link
Collaborator

Let's just double check that the bug is indeed resolved and click around again to make sure we didn't break anything. Then merge!

Copy link
Collaborator
@cmalinmayor cmalinmayor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it more thoroughly, including with orthoviews and 3d view, and everything looks great! 🍅 🦖

@cmalinmayor cmalinmayor merged commit eb1496f into main Jan 13, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0