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

Improve display of annotation names #1532

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

petebankhead
Copy link
Member

Improve the display of annotation names.

QuPath v0.5.1

image

With PR

image

@petebankhead petebankhead added this to the v0.6.0 milestone May 24, 2024
@petebankhead
Copy link
Member Author

This should always find a point on the ROI and connect the name to that. This should make it easier to see which object is named, especially if the object has disconnected parts and holes.

The last commit uses the selected object color to further reduce ambiguity.

@petebankhead petebankhead merged commit 5062c06 into qupath:main May 24, 2024
3 checks passed
@Rylern
Copy link
Contributor

Rylern commented May 24, 2024

Looks good to me, just one thing: is paintOverlay supposed to be called from multiple threads? Some fields are read/modified without synchronization

@petebankhead petebankhead deleted the names branch May 25, 2024 06:31
@petebankhead
Copy link
Member Author

@Rylern Very good question... no, but maybe?

Its primary use is for showing overlays in the viewer, where it should really be called on the application thread (or a background thread dedicated to rendering).

It could also be called when writing out a rendered image + overlays... and maybe that would involve writing tiles in parallel. If so, then I'd expect important variables never to be changed: we'd create an overlay per image we want to export.

Therefore I can't think of a time when this will be problematic in practice, but it's definitely something to be cautious about.

If we don't find any specific case where the current behavior is problematic, then I'm not sure it's worth making it properly thread-safe - and instead devote the time that would require to an entirely new viewer with overlays that are designed much better than this from the start.

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.

None yet

2 participants