Skip to content
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(cornerstoneTools):Fetch the overlay if an async method is available #1451

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wayfarer3130
Copy link
Contributor

This fix allows the overlay tool to call an asynchronous retrieveBulkData method if the overlay pixeldata has a retrieveBulkData method, and then render the overlay correctly.

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #1451 (80bc9e2) into master (95c3b7c) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
- Coverage   20.16%   20.10%   -0.06%     
==========================================
  Files         287      287              
  Lines       10102    10131      +29     
  Branches     2060     2069       +9     
==========================================
  Hits         2037     2037              
- Misses       6852     6872      +20     
- Partials     1213     1222       +9     
Impacted Files Coverage Δ
src/tools/OverlayTool.js 1.16% <0.00%> (-0.60%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95c3b7c...80bc9e2. Read the comment docs.

* This method does depend on some of the JSON DICOM representations, but those don't have to come from
* JSON, it falls back to the original Uint8Array representation, which can come from anywhere.
*/
getOverlayData(pixelData, element) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chafey This is the asynchronous version of the retrieve code. It assumes 'dicom' format if the retrieveBulkData is present, which isn't unreasonable, and otherwise falls back to the existing behaviour. To do that, the retrieve call is made, but also the data is handled as InlineBinary and other various formats to support JSON based overlays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant