-
-
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
Changes from 3 commits
f5c4258
31ac98d
404d0b5
91315a5
84830f3
5bef6ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. we should add the same logic to the PanelStudyBrowswer too |
||
() => { | ||
const mappedDisplaySets = _mapDisplaySets( | ||
displaySetService.getActiveDisplaySets(), | ||
thumbnailImageSrcMap, | ||
trackedSeries, | ||
viewports, | ||
viewportGridService, | ||
dataSource, | ||
displaySetService, | ||
uiDialogService, | ||
uiNotificationService | ||
); | ||
|
||
setDisplaySets(mappedDisplaySets); | ||
} | ||
); | ||
|
||
return () => { | ||
SubscriptionDisplaySetsAdded.unsubscribe(); | ||
SubscriptionDisplaySetsChanged.unsubscribe(); | ||
SubscriptionDisplaySetMetaDataInvalidated.unsubscribe(); | ||
}; | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [ | ||
|
@@ -459,6 +479,7 @@ function _mapDisplaySets( | |
// .. Any other data to pass | ||
}, | ||
isTracked: trackedSeriesInstanceUIDs.includes(ds.SeriesInstanceUID), | ||
isHydrated: ds.isHydrated, | ||
viewportIdentificator, | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ const ThumbnailList = ({ | |
imageSrc, | ||
messages, | ||
imageAltText, | ||
isHydrated, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is kind of weird that we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about calling it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about |
||
}) => { | ||
const isActive = activeDisplaySetInstanceUIDs.includes( | ||
displaySetInstanceUID | ||
|
@@ -104,6 +105,7 @@ const ThumbnailList = ({ | |
onThumbnailDoubleClick(displaySetInstanceUID) | ||
} | ||
viewportIdentificator={viewportIdentificator} | ||
isHydrated={isHydrated} | ||
/> | ||
); | ||
default: | ||
|
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 calledDISPLAY_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
andDISPLAY_SET_SERIES_METADATA_INVALIDATED
Let's think till we meet