Skip to content

fix: PDF display request in v3 - #3878

Merged
sedghi merged 4 commits into
masterfrom
fix/pdf-request-type
Jan 8, 2024
Merged

sedghi merged 4 commits into
masterfrom
fix/pdf-request-type

Conversation

@wayfarer3130

@wayfarer3130 wayfarer3130 commented Jan 5, 2024 •

Copy link
Copy Markdown
Contributor

fixes #3826

Context

Some PACS systems required requesting encapsulated PDF using multipart/related;type=application/pdf instead of application/octet-stream. This PR enables the required fetch to be completed.

Changes & Results

Change the retrieveBulkdata to use the dicomweb-client 0.10.4 version which allows fetching bulkdata using application/pdf, with a backup of application/octet-stream

Testing

Find an encapsulated PDF instance on a DCM4CHEE back end and ensure it displays in OHIF

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:

@netlify

netlify Bot commented Jan 5, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for ohif-platform-docs canceled.

Name Link
🔨 Latest commit c682c6f
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/659c37a3f6357b0008331c76

@netlify

netlify Bot commented Jan 5, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit c682c6f
🔍 Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/659c37a3826f87000848a02b
😎 Deploy Preview https://deploy-preview-3878--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.

@wayfarer3130
wayfarer3130 requested a review from sedghi January 5, 2024 19:29
// isn't well specified in the standard, but is needed in
// any implementation that stores static copies of the metadata
StudyInstanceUID: naturalized.StudyInstanceUID,
mediaTypes: mediaType

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change allow requesting first in the provided media type, and then defaulting to application/octet-stream if not found.

@codecov

codecov Bot commented Jan 5, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (8a335bd) 46.23% compared to head (c682c6f) 44.44%.
Report is 185 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3878      +/-   ##
==========================================
- 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/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%) ⬆️
...ils/metadataProvider/getPixelSpacingInformation.js 0.00% <ø> (ø)
platform/core/src/log.js 14.28% <0.00%> (-85.72%) ⬇️
...services/DicomMetadataStore/createStudyMetadata.js 0.00% <0.00%> (ø)
...ervices/DicomMetadataStore/createSeriesMetadata.js 0.00% <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 e8858f3...c682c6f. Read the comment docs.

supportsWildcard: true,
staticWado: true,
singlepart: 'bulkdata,video,pdf',
singlepart: 'video',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we change other servers as well? like dcm4chee one?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

hello @sedghi please do am experiencing the same issue (no online PDF viewer installed) with orthanc .

@sedghi

sedghi commented Jan 5, 2024

Copy link
Copy Markdown
Member

@Michael-Andersen Can you check if this branch solve the issue for your PDF reported in #3826 . Thanks

@Michael-Andersen

Copy link
Copy Markdown
Contributor

@sedghi Yes pdfs are loading properly from my DCM4CHEE instance on this branch, thanks!

@cypress

cypress Bot commented Jan 8, 2024 •

Copy link
Copy Markdown

Passing run #3685 ↗︎

0 44 0 0 Flakiness 0

Details:

Update Cypress version to 13.6.2
Project: Viewers Commit: c682c6f8cb
Status: Passed Duration: 06:16 💡
Started: Jan 8, 2024 6:09 PM Ended: Jan 8, 2024 6:15 PM

Review all test suite changes for PR #3878 ↗︎

@sedghi
sedghi merged commit 9865030 into master Jan 8, 2024
ryan00012 pushed a commit to new-lantern/nl-ohif that referenced this pull request Mar 27, 2024
* chore(version): Update package versions [skip ci]

* feat(displayArea): add display area to hanging protocol (OHIF#3691)

Co-authored-by: Ouwen Huang <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(debug): Add timing information about time to first image/all images, and query time (OHIF#3681)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(cli): Add npm packaged mode not working (OHIF#3689)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(translation): Side panel translate fix (OHIF#3156)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(locale): Added Turkish language support (tr-TR) - Community PR (OHIF#3695)

Co-authored-by: Ahmet Altay <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(locale): add German translations - community PR (OHIF#3697)

Co-authored-by: pwespi <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(measurement and microscopy):  various small fixes for measurement and microscopy side panel (OHIF#3696)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(segmentation scroll): and hydration bugs (OHIF#3701)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(bugs): fixing lots of bugs regarding release candidate (OHIF#3700)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(Segmentation): download RTSS from Labelmap(OHIF#3692)

Co-authored-by: Alireza <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(segmentation): do not use SAB if not specified (OHIF#3705)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(modality unit): fix the modality unit per target via upgrade of cs3d (OHIF#3706)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(voi): should publish voi change event on reset (OHIF#3707)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(segmentation):  Various fixes for segmentation mode and other (OHIF#3709)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(modules): add stylus loader as an option to be uncommented (OHIF#3710)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(i18n): display set(s) are two words for English messages (OHIF#3711)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(export): wrong export for the tmtv RT function (OHIF#3715)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(display messages): broken after timings (OHIF#3719)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* chore(version): move to the next beta version [BUMP BETA]

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(calibration): No calibration popup caused by perhaps an unused code optimization for production builds (OHIF#3736)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(cine): Use the frame rate specified in DICOM and optionally auto play cine (OHIF#3735)

Co-authored-by: rareramos <[email protected]>
Co-authored-by: Doug Horner <[email protected]>
Co-authored-by: Rehan <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(recipes): package.json script orthanc:up docker-compose path (OHIF#3741)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* docs(azure): Azure static Deployment details (OHIF#3740)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(sr): dcm4chee requires the patient name for an SR to match what is in the original study (OHIF#3739)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(toolbar): allow customizable toolbar for active viewport and allow active tool to be deactivated via a click (OHIF#3608)

Co-authored-by: Joe Boccanfuso <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(measurement service): Implemented correct check of schema keys in _isValidMeasurment. (OHIF#3750)

* feat(filters): save worklist query filters to session storage so that they persist between navigation to the viewer and back (OHIF#3749)

Co-authored-by: ladeirarodolfo <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(i18n): enhanced i18n support (OHIF#3730)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(thumbnail): Avoid multiple promise creations for thumbnails (OHIF#3756)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* docs(faq): FAQ and Segmentation Mode Fix for some studies (OHIF#3762)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(hp callback): Add viewport ready callback (OHIF#3772)

Co-authored-by: Ouwen Huang <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat: add VolumeViewport rotation (OHIF#3776)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(arrow): ArrowAnnotate text key cause validation error (OHIF#3771)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(path): upgrade docusaurus for security (OHIF#3780)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(dicomJSON): Add Loading Other Display Sets and JSON Metadata Generation script (OHIF#3777)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(overlay): Overlays aren't shown on undefined origin (OHIF#3781)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: 🐛 Run error handler for failed image requests (OHIF#3773)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(url): Add SeriesInstanceUIDs wado query param (OHIF#3746)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(docs): Added various training videos to support the OHIF CLI tools (OHIF#3794)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(metadata): to handle cornerstone3D update for htj2k (OHIF#3783)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(DICOM Overlay): The overlay data wasn't being refreshed on change (OHIF#3793)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(events): broadcast series summary metadata (OHIF#3798)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat: Merge Data Source (OHIF#3788)

Add the ability to merge two different series queries to generate a complete study query result.  Provides basic support for other types of merges, but those aren't yet added as full features.

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: Update the CS3D packages to add the most recent HTJ2K TSUIDS (OHIF#3806)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(cine): Set cine disabled on mode exit. (OHIF#3812)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(SM): drag and drop is now fixed for SM (OHIF#3813)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(auth): fix the issue with oauth at a non root path (OHIF#3840)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(HP): Added new 3D hanging protocols to be used in the new layout selector (OHIF#3844)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(i18n): enhanced i18n support (OHIF#3761)

* fix: address and improve system vulnerabilities (OHIF#3851)

* feat(config): Add activateViewportBeforeInteraction parameter for viewport interaction customization (OHIF#3847)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(customizationService): Enable saving and loading of private tags in SRs (OHIF#3842)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* Fix(HPService): custom image load performed is now reset to false on HP exit (OHIF#3809)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(dicom-seg) : Fix the missing color tag when loading Dicom-Seg (OHIF#3822)

Co-authored-by: Alireza <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* docs: Update HangingProtocolService.md doc sameAs example to contain constr… (OHIF#3765)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(overlay): add inline binary overlays (OHIF#3852)

* fix(icon-style): Ensure consistent icon dimensions (OHIF#3727)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* chore(version): upgrade cornerstone3D versions (OHIF#3853)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* chore(version): upgrade cornerstone3D versions to fix orientation (OHIF#3854)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: colormap for stack viewports via HangingProtocol (OHIF#3866)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: convert radian to degree value for mip rotation (OHIF#3881)

* fix: PDF display request in v3 (OHIF#3878)

Co-authored-by: Alireza <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat: improve disableEditing flag (OHIF#3875)

Co-authored-by: Igor Octaviano <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(ui): sidePanel expandedWidth (OHIF#3728)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat: Add on mode init hook (OHIF#3882)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* docs: Update user-account-control.md (OHIF#3877)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(segmentation): upgrade cs3d to fix various segmentation bugs (OHIF#3885)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(transferSyntax): prefer server transcoded transfer syntax for all images (OHIF#3883)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(hp): enable OHIF to run with partial metadata for large studies at the cost of less effective hanging protocol (OHIF#3804)

Co-authored-by: rodrigobasilio2022 <[email protected]>
Co-authored-by: rodrigobasilio2022 <[email protected]>

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: Update CS3D to fix second render (OHIF#3892)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* docs: Update architecture.md (OHIF#3891)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: 🐛 Check merge key for merge data source (OHIF#3901)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: is same orientaiton (OHIF#3905)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(viewport-sync): remember synced viewports bw stack and volume and RENAME StackImageSync to ImageSliceSync (OHIF#3849)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: catch errors in getPTImageIdInstanceMetadata (OHIF#3897)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix toggleHpTools to support split primary button (OHIF#3900)

Fixes a small bug in toggling buttons with hanging protocols.

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix: 🐛 Sort merge results based on default data source (input) (OHIF#3903)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(errorboundary): format stack trace properly (OHIF#3931)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(resize): Optimize resizing process and maintain zoom level (OHIF#3889)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(demo): Deploy issue (OHIF#3951)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(docs): Minor typos in hpModule.md (OHIF#3962)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* docs: Typo (OHIF#3975)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(cli): mode creation template (OHIF#3876) (OHIF#3981)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(delete measurement): icon for measurement table (OHIF#3775)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* fix(SR display): and the token based navigation (OHIF#3995)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

* feat(worklist): New worklist buttons and tooltips (OHIF#3989)

* chore(version): version.json [skip ci]

* chore(version): Update package versions [skip ci]

---------

Co-authored-by: ohif-bot <[email protected]>
Co-authored-by: Alireza <[email protected]>
Co-authored-by: Ouwen Huang <[email protected]>
Co-authored-by: Bill Wallace <[email protected]>
Co-authored-by: Joe Boccanfuso <[email protected]>
Co-authored-by: wangxuan <[email protected]>
Co-authored-by: Ahmet Altay <[email protected]>
Co-authored-by: pwespi <[email protected]>
Co-authored-by: dxlin <[email protected]>
Co-authored-by: rareramos <[email protected]>
Co-authored-by: Doug Horner <[email protected]>
Co-authored-by: Rehan <[email protected]>
Co-authored-by: edwardyangxin <[email protected]>
Co-authored-by: bluesteel23 <[email protected]>
Co-authored-by: Joe Boccanfuso <[email protected]>
Co-authored-by: ladeirarodolfo <[email protected]>
Co-authored-by: Pavel <[email protected]>
Co-authored-by: Ouwen Huang <[email protected]>
Co-authored-by: Pedro H. Köhler <[email protected]>
Co-authored-by: Igor Octaviano <[email protected]>
Co-authored-by: Sofien-Sellami <[email protected]>
Co-authored-by: Salim Kanoun <[email protected]>
Co-authored-by: Celian-abd <[email protected]>
Co-authored-by: AbishekBista9 <[email protected]>
Co-authored-by: rodrigobasilio2022 <[email protected]>
Co-authored-by: rodrigobasilio2022 <[email protected]>
Co-authored-by: Ibrahim <[email protected]>
Co-authored-by: EricB <[email protected]>
Co-authored-by: EricB <[email protected]>
@StefanSmaczny

Copy link
Copy Markdown

Hi,

does this fix also apply to Orthanc? I mentioned the same problem with displaying PDFs in the Orthanc Forum https://discourse.orthanc-server.org/t/ohif-plugin-is-displaying-mri-images-but-not-pdf-or-sr/4315/10 , but was told to come here.
Also, it seems that I am not the only one with this problem:
https://community.ohif.org/t/pdf-load-solution-for-ohif-orthanc/1224

Any advice would be highly appreciated! Please forgive me if this trivial and can be solved easily, but I do not have a lot of experience with OHIF (or Orthanc).

thanh-nguyen-dang pushed a commit to uc-cdis/Viewers that referenced this pull request May 1, 2024
@holakunle

Copy link
Copy Markdown

hello @StefanSmaczny have you been able to find a way, am experiencing the same issues with orthanc

@StefanSmaczny

Copy link
Copy Markdown

@holakunle Hi Dada, unfortunately not. I have been talking to Sébastian Jodogne from Orthanc if he can implement a way to view SR files within Stone Viewer (the viewer made by the Orthanc people), and he has been more responsive. He says he wants to implement it this summer. Would that be of any help to you?

@sedghi

sedghi commented Jun 6, 2024

Copy link
Copy Markdown
Member

@StefanSmaczny what is the current issue? do you have a issue number?

@holakunle

holakunle commented Jun 8, 2024 •

Copy link
Copy Markdown

@StefanSmaczny what is the current issue? do you have a issue number?

Hello @sedghi

Ohif + orthanc isn't displaying PDFs. It says " No pdf viewer installed". Have been trying to find a way round it from the above solution but I guess it's specifically applies to DCM4CHEE. Any help on this will be much appreciated.

And NO. There is no issue number

Thank you

@amazy

amazy commented Jun 25, 2024

Copy link
Copy Markdown

@sedghi here is an issue number #4256, created by @holakunle and updated by me.

@sedghi
sedghi deleted the fix/pdf-request-type branch January 22, 2025 16:15
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.

[Bug] PDFs Won't Load From DCM4CHEE

6 participants