-
-
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): Display set messages support & displaying of series inconsistencies in the thumbnail #3499
feat(Thumbnail): Display set messages support & displaying of series inconsistencies in the thumbnail #3499
Conversation
✅ 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 #3499 +/- ##
=======================================
Coverage 42.81% 42.81%
=======================================
Files 80 80
Lines 1448 1448
Branches 340 340
=======================================
Hits 620 620
Misses 663 663
Partials 165 165
Continue to review full report in Codecov by Sentry.
|
43ccd25
to
a4fbfff
Compare
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.
Thanks for putting this together 🎖️
I left some comments/questions, let's discuss them later today.
...ions/measurement-tracking/src/panels/PanelStudyBrowserTracking/PanelStudyBrowserTracking.tsx
Outdated
Show resolved
Hide resolved
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 suggestions and comments.
...ions/measurement-tracking/src/panels/PanelStudyBrowserTracking/PanelStudyBrowserTracking.tsx
Outdated
Show resolved
Hide resolved
platform/ui/src/components/ThumbnailNoImage/ThumbnailNoImage.tsx
Outdated
Show resolved
Hide resolved
f36b9f6
to
8344c61
Compare
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.
Reviewed. Left some comments.
👍
platform/core/src/services/DisplaySetService/DisplaySetMessage.ts
Outdated
Show resolved
Hide resolved
platform/core/src/services/DisplaySetService/DisplaySetMessage.ts
Outdated
Show resolved
Hide resolved
platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx
Outdated
Show resolved
Hide resolved
platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx
Show resolved
Hide resolved
platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx
Outdated
Show resolved
Hide resolved
platform/core/src/services/DisplaySetService/DisplaySetMessage.ts
Outdated
Show resolved
Hide resolved
platform/core/src/services/DisplaySetService/DisplaySetMessage.ts
Outdated
Show resolved
Hide resolved
platform/core/src/services/DisplaySetService/DisplaySetMessage.ts
Outdated
Show resolved
Hide resolved
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 good. Thanks so much.
@sedghi feel free to merge it although I'm still not happy with this flickering thing. I think we should refactor the whole left panel to avoid getting stuck with these UI limitations but this work should be done in a separate issue. |
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 feel like not merging now honestly.
First it was ok let's merge it although it should have appeared on the right side, now is it has weird behaviour when it is the last item. We don't know when the left panel is reworked maybe in 6 months, and I don't want to ship buggy feature.
@sedghi I'll try to find a fix for this specific bug myself later today 👍 @rodrigobasilio2022 feel free to do the same. |
…ewers into feat/WarningButton
@sedghi I pushed a new tooltip that uses React portals to avoid these overflow issues. Can you please take a look? |
/** | ||
* A portal based tooltip. | ||
*/ | ||
export default class ToolTip extends React.Component { |
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 sort of expected this to be named PortalTooltip
to match the name of the file. I think I prefer it being named PortalTooltip
but maybe I am being picky. Also note that the other/existing tool tip component is named Tooltip
(i.e. small t for tip). We should be consistent one way or the other.
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.
Sure, i'll update it.
Why introducing this completely foreign to most users concept "Display set"? That thumbnail corresponds to a DICOM series, why not call it "DICOM series"? |
const portalNodes = {}; | ||
|
||
/** | ||
* A portal based tooltip. |
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.
React portals sound cool - until now I did not know about them. Thanks for thinking of this. However I am bit surprised that we need to use the older style class type components. I did a quick search of the code base and noticed that this would be the first/only component that uses the old style - but I might be wrong. Are we actually forced to use this? I did see this https://react.dev/reference/react-dom/createPortal#rendering-to-a-different-part-of-the-dom, does it help so that we can use a function component instead?
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.
React portals sound cool - until now I did not know about them. Thanks for thinking of this. However I am bit surprised that we need to use the older style class type components. I did a quick search of the code base and noticed that this would be the first/only component that uses the old style - but I might be wrong. Are we actually forced to use this? I did see this https://react.dev/reference/react-dom/createPortal#rendering-to-a-different-part-of-the-dom, does it help so that we can use a function component instead?
I repurposed this component. It's not exposed and not worth going through the trouble of migrating it to function component. I added it just to workaround this specific issue, we should refactor the left panel so we can go back and use the original tooltip instead. Also, this is my last effort to address this specific issue without touching the left panel.
@fedorov The concept of a display set has persisted since the first version of OHIF, this tooltip is tied to the display set messages which is part of the display set. I think this was done like that for consistency and also for extensibility once that messages could extend beyond just series. |
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.
LGTM
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.
@igoroctaviano Can you please add comment on top of each PortalToolTip and PortalTooltipCard on where the code is being copied over? thanks
Done, thanks. |
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 for this.
Also thanks @igoroctaviano for adding the portal
When the user has studies with series supposed to be reconstructable but they arent, at first its hard to identify them and know why a particular series cant be viewed in MPR mode. This PR proposes a warning button in thumbnail list that highlights problems in series and help users know geometry issues in the series. It is related to issue IDC #3360
Below I added some studies from the IDC database that has series with different problems
Study with a series that change position during scan
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7009.9004.229337801792248347333415175865
Study with a series with irregular pixel spacing
http://localhost:3000/viewer?StudyInstanceUIDs=1.2.840.113654.2.55.69925400202012637024302712643359784845
Studies has at least a series that can be viewed in MPR mode, despite the problems
http://localhost:3000/viewer?StudyInstanceUIDs=1.2.840.113654.2.55.268978779666003033721491501200337886584 (S. 3)
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.3098.5025.250976478345829511981090188621 (S. 5)
Study has a serie with different orientations that wrongly can be reconstructed in current OHIF version. My fixes prevent that.
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.99.1071.55696427943949105811475330286060 (S. 601)
Studies with series with MIP images and which the first image appears to be an localizer for the series in another orientation
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7009.2406.131628405171680429117301556825
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.99.1071.16051849653578423672035750287473
Study with series composed by two volumes of data
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.99.1071.16051849653578423672035750287473 (S. 2)