-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix the wrong aspect ratio load #3534
Conversation
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
@@ Coverage Diff @@
## master #3534 +/- ##
=======================================
Coverage 42.75% 42.75%
=======================================
Files 82 82
Lines 1450 1450
Branches 338 338
=======================================
Hits 620 620
Misses 667 667
Partials 163 163 Continue to review full report in Codecov by Sentry.
|
Passing run #3376 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
I remember this weird effect when I used throttle for resize, that is why I made it debounce, though throttle seem much more smooth, but it has these werid flickerings OHIF-Viewer.1.webm |
extensions/cornerstone/src/Viewport/OHIFCornerstoneViewport.tsx
Outdated
Show resolved
Hide resolved
extensions/cornerstone/src/Viewport/OHIFCornerstoneViewport.tsx
Outdated
Show resolved
Hide resolved
c4794e0
to
805612f
Compare
Context
The resize listener in OHIFCornerstoneViewport wasn't firing the resize most of the time on DICOM SR load because the wrong parameter was being applied.
Also added fixes to OHIFCornerstoneViewport to provide ready events for image rendered so that the tests can proceed properly. That allows testing the actual expansion/collapse of the viewport rendering properly because it is possible to know when it has been updated.
Finally, a tweak to the scrollbar size to reflect the number of images rather than being a constant size.
Changes & Results
Testing
This test only fails if one has added automatically opening of the measurement panel. I'm actually not sure how to reproduce this inside vanilla OHIF.
Find a study that has a non square image (SIIM Sally dataset with XC works) in fact any dataset with an SR saved is sufficient
Save a DICOM SR to the study
Double click the DICOM SR to load into 1x1 mode
Click the load button, watching the position of measurements. Often, previously, they wouldn't move, AND the aspect ratio of non-square images would change as actually viewed. This is not 100%, but was 20-50%
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment