Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

fix: Microscopy bulkdata and image retrieve

Open wayfarer3130 opened this issue 1 year ago • 5 comments

Context

Some backends incorrectly report the type of the bulkdata. This PR checks the bulkdata contents to see if it is multipart, and if so, demultiparts it when doing the retrieveBulkdata Also, for many back ends, using the generic / accept type works fine for retrieval, and that can be faster than having a full retrieve list.

Changes & Results

For all back ends, unless configured otherwise, retrieve bulkdata and de-multipart it For static wado back ends, use '/' as the retrieve condition.

Testing

Configure a back end with and without staticWado true in the datasource (eg datasources='ohif' has it true) Display a microscopy study containing bulkdata incorrectly returned as 'application/octet-stream' - the SM modality studies on 'ohif' are examples. The SM should display and the accept header should be '/'

If you remove the staticWado setting, then the SM should still display, and against a system which returns uncompressed data for images, should still return correctly.

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments, etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API additions or removals.

Tested Environment

  • [] OS:
  • [] Node version:
  • [] Browser:

wayfarer3130 avatar Jan 12 '24 20:01 wayfarer3130

Deploy Preview for ohif-platform-docs ready!

Name Link
Latest commit 11df220ae34a1d7d93c4e9186700c5aef8af0988
Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/65a19bf3a0450a0008da8896
Deploy Preview https://deploy-preview-3894--ohif-platform-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 12 '24 20:01 netlify[bot]

Deploy Preview for ohif-dev ready!

Name Link
Latest commit 11df220ae34a1d7d93c4e9186700c5aef8af0988
Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/65a19bf36c604800087d4600
Deploy Preview https://deploy-preview-3894--ohif-dev.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 12 '24 20:01 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8a335bd) 46.23% compared to head (11df220) 44.44%. Report is 215 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3894      +/-   ##
==========================================
- Coverage   46.23%   44.44%   -1.80%     
==========================================
  Files          78       80       +2     
  Lines        1276     1332      +56     
  Branches      312      327      +15     
==========================================
+ Hits          590      592       +2     
- Misses        548      587      +39     
- Partials      138      153      +15     
Files Coverage Δ
platform/app/src/routes/WorkList/filtersMeta.js 0.00% <ø> (ø)
platform/core/src/log.js 14.28% <ø> (-85.72%) :arrow_down:
...ervices/DicomMetadataStore/createSeriesMetadata.js 0.00% <ø> (ø)
...services/DicomMetadataStore/createStudyMetadata.js 0.00% <ø> (ø)
platform/core/src/utils/addAccessors.js 9.09% <ø> (ø)
platform/core/src/utils/downloadCSVReport.js 0.00% <ø> (ø)
platform/core/src/utils/formatDate.js 0.00% <ø> (ø)
platform/core/src/utils/index.js 100.00% <ø> (ø)
...form/core/src/utils/isDisplaySetReconstructable.js 5.00% <ø> (+0.18%) :arrow_up:
...ils/metadataProvider/getPixelSpacingInformation.js 0.00% <ø> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

codecov[bot] avatar Jan 12 '24 20:01 codecov[bot]

Passing run #3713 ↗︎

0 44 0 0 Flakiness 0

Details:

fix: Fetch with exact media type if not staticWado
Project: Viewers Commit: 11df220ae3
Status: Passed Duration: 05:51 💡
Started: Jan 12, 2024 8:11 PM Ended: Jan 12, 2024 8:17 PM

Review all test suite changes for PR #3894 ↗︎

cypress[bot] avatar Jan 12 '24 20:01 cypress[bot]

@wayfarer3130 Can you please put a PR to dicomweb-client for these changed, I know there might be some push back but we need to at least have the PR open before we go in this direction

sedghi avatar Jan 22 '24 14:01 sedghi

@igoroctaviano Could you do me a favor and test this branch against IDC hosted SM to see if everything is working fine? It should work

sedghi avatar Mar 15 '24 13:03 sedghi

I tested on local orthanc and dcm4chee and works fine

sedghi avatar Mar 15 '24 13:03 sedghi