-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat(thumbnail highlight): Thumbnails of hydrated series are now highlighted #3594
feat(thumbnail highlight): Thumbnails of hydrated series are now highlighted #3594
Conversation
…(i.e. SR, SEG, RTSTRUCT, etc.) are now highlighted to indicate when the item is hydrated in OHIF. Addresses OHIF issue 3421. Also, thumbnails with no image that are 'active' (i.e. the viewport is selected in the viewer) are now also highlighted appropriately with a border just like the image thumbnails.
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
@@ Coverage Diff @@
## master #3594 +/- ##
=======================================
Coverage 42.58% 42.58%
=======================================
Files 80 80
Lines 1463 1463
Branches 340 340
=======================================
Hits 623 623
Misses 675 675
Partials 165 165 Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So something came to my mind to try again and seems to be a bug. it is where a segment is hydrated then removed, it still shows it as hydrated
Good catch. I will have a look. Thanks so much. |
Moved the setting of the displaySet.isHydrated flag to the SegmentationService. The DisplaySetService event is fired when the isHydrated flag is updated.
} = this.servicesManager.services; | ||
const displaySet = displaySetService.getDisplaySetByUID(displaySetUID); | ||
displaySet.isHydrated = isHydrated; | ||
displaySetService.setDisplaySetMetadataInvalidated(displaySetUID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the best way, but at the very least it will start a discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, I see why you need this, but at the same time we have another listener for this at the OHIFCornerstoneViewport which invalidates the data. Maybe we need another event to decouple this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a new DisplaySetService
event called DISPLAY_SET_UPDATED
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure really, it is kind of the same event we are invalidating a metadata, but at the same time we don't want to hit that other listener in the OHIFCornerstoneViewport, aaaaah
I hate having DISPLAY_SET_UPDATED
and DISPLAY_SET_SERIES_METADATA_INVALIDATED
Let's think till we meet
…possible-to-know-series-hydrated
@@ -36,6 +36,7 @@ const ThumbnailList = ({ | |||
imageSrc, | |||
messages, | |||
imageAltText, | |||
isHydrated, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is kind of weird that we have isHydrated
even for regular imagees (e.g., CT, PT, etc.), can we rename it to something else? I don't know what but basically it is is this display set hydrated given that it is derived (rt, seg, sr)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about calling it isADerivedAndHydratedDisplaySet
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about isHydratedForDerivedDisplaySet
@@ -248,9 +248,29 @@ function PanelStudyBrowserTracking({ | |||
} | |||
); | |||
|
|||
const SubscriptionDisplaySetMetaDataInvalidated = displaySetService.subscribe( | |||
displaySetService.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add the same logic to the PanelStudyBrowswer too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. thanks a lot!
…possible-to-know-series-hydrated
Context
Thumbnails representing hydratable series (i.e. SR, SEG, RTSTRUCT, etc.) are now highlighted to indicate when the item is hydrated in OHIF.
Addresses OHIF issue #3421.
Also, thumbnails with no image that are 'active' (i.e. the viewport is selected in the viewer) are now also highlighted appropriately with a border just like the image thumbnails.
The highlighting is per as described here
Changes & Results
SEG and RTSTRUCT display sets now have their
isHydrated
flag set to true when they are hydrated. Hydrated SR display sets for tracked measurements already had this flag set appropriately.The
ThumbnailNoImage
modality label colours and the "list-bullets" icon color when the thumbnail is hydrated are now set based on whether the associated display set is hydrated or not. Also a change was made inThumbnailNoImage
so that it indicates an active series (i.e. when visible and highlighted in an OHIF viewport) with a border just like theThumbnail
(with an image).Testing
A few test cases to consider...
Test A
View a study with tracked measurements.
Double click or drag and drop the SR into a viewport.
Opt NOT to track the measurements and simply view the SR in the viewport.
The thumbnail for the SR should have a border indicating that it is the active viewport. Activating a different viewport should remove the border around the thumbnail.
Similar behaviour should occur when loading a study with SEG or RTSTRUCT and opting NOT to hydrate the segmentation.
Test B
View a study with tracked measurements.
Double click or drag and drop the SR into a viewport.
Opt to track the measurements.
The thumbnail for the hydrated SR should look similar to below...
Similar behaviour should occur when loading a study with SEG or RTSTRUCT after opting to hydrate the segmentation.
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment