Get the right displayed area from cornerstone, to allow overlay display.#1432
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1432 +/- ##
==========================================
- Coverage 19.87% 19.87% -0.01%
==========================================
Files 285 285
Lines 10031 10040 +9
Branches 2042 2045 +3
==========================================
+ Hits 1994 1995 +1
- Misses 6841 6845 +4
- Partials 1196 1200 +4
Continue to review full report at Codecov.
|
src/tools/OverlayTool.js
Outdated
| const imageHeight = | ||
| Math.abs(viewport.displayedArea.brhc.y - viewport.displayedArea.tlhc.y) * | ||
| viewportPixelSpacing.row; | ||
| if (viewport.overlay === undefined) { |
There was a problem hiding this comment.
I don't think we need to check for overlay inside the overlay tool. If active it should just execute everyhing.
There was a problem hiding this comment.
It was just a way to turn a single overlay on/off, rather than the entire overlay tool. Figured it would expand to allow specific overlays to be activated/deactivated, eg for GSPS overlays.
There was a problem hiding this comment.
Set it up to avoid displaying if the overlayColor is false
Also added a toggle to allow turning the overlay on and off.
…ble scaling, causing the image to be cropped.
… value The overlay colour was set to a purple value ina previous change, but wasn't configurable, so this change makes the colour configurable, to allow for a site customization to make it consistently visible.
1f308d7 to
ff5ecc0
Compare
…educe cognitive complexity rule Reduce cognitive complexity by splitting code
6e25e42 to
6f9887e
Compare
|
🎉 This PR is included in version 6.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |

This just fixes overlay display - it was previously set to be active by default, but was failing because the displayedArea isn't actually available by default, and the displayed area is actually wrong because it means the overlay setup is done incorrectly/gets cropped by the canvas updates, so just doing it on a complete canvas works better.
@igoroctaviano - can you take a look?