-
Notifications
You must be signed in to change notification settings - Fork 25
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
Ignore null ImageJ2 Overlays #300
Conversation
I'm sorry; it's not clear to me what's happening. Here's my understanding:
Is that right? If the |
Yeah, that's checked here
Well, the
Yup!
Well, there is no |
839e899
to
4619e19
Compare
@gselzer ok I added a test.. does it look reasonable to you? Currently it's failing because it isn't getting a display, which I am confused about because I thought IJLegacy could run headlessly..?!
To me, here we are saying "The My thoughts:
|
You'll need to ensure that |
First guess: try actually showing the dataset? |
4619e19
to
5a9e232
Compare
Suppose we have a
Dataset
, with aDefaultROITree
as therois
property on theDataset
, that we want to display in the legacy UI.To do this, we call
LegacyUIService.show(<our dataset>)
, which will use theLegacyImageMap
to create a synchronizedImagePlus
. Once that is displayed, ImageJ Legacy will fire off aDisplayUpdatedEvent
, which eventually triggersOverlayHarmonizer.updateLegacyImage
. This method usesOverlayService.getActiveOverlay(<our display>)
, which returnsnull
- this overwrites theDefaultROITree
overlay.This PR changes
OverlayHarmonizer
to only update the overlay if the ImageJ2Overlay
returned byOverlayService
is notnull
- this prevents overwriting legacy Overlays unless we have an ImageJ2Overlay
that actually has content.