-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix(cine): prevent crash on second view/hydration of SR series #5724
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
base: master
Are you sure you want to change the base?
fix(cine): prevent crash on second view/hydration of SR series #5724
Conversation
✅ Deploy Preview for ohif-dev canceled.
|
|
|
||
| function _getVolumeFromViewport(viewport: Types.IBaseVolumeViewport) { | ||
| // Handle non-volume viewports that don't have getAllVolumeIds | ||
| if (!viewport || !viewport.getAllVolumeIds) { |
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.
Consider changing this to if(!viewport?.getAllVolumeIds) {
jbocce
left a comment
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 so much. The change looks great - one small comment to address. Also let's add a playwright test to make sure this does not happen again. See https://docs.ohif.org/development/playwright-testing/ for more information.
|
Please update your branch with master. Thanks. |
|
Sure, thanks for your comments! |
9c14c59 to
9936d9a
Compare
jbocce
left a comment
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 so much for this! I am approving the PR but will not merge until we release 3.12. It will be in for 3.13.
|
The changes to the OHIF docs look good. |
Context
Fixes #5634
When an SR series is viewed/opened for the second time (via double-click or drag-and-drop), it causes a crash with
TypeError: getAllVolumeIds is not a functionbecause the cine service assumes all viewports are volume viewports.Changes
initCineService.tsto return early whengetAllVolumeIdsis not available.Results
The viewer no longer crashes when you reopen the SR series
Before:
Reopening an SR series causes OHIF to crash with
getAllVolumeIds is not a function.After:
SR series can be reopened without causing any crash or errors.
Testing
StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7310.5101.860473186348887719777907797922Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment