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

[Bug] dicom-image-loader: createImage uses now undefined options.decodeConfig #916

Closed
abustany opened this issue Nov 28, 2023 · 6 comments
Closed

Comments

@abustany
Copy link
Contributor

Describe the Bug

Commit 85fd193 removed the decodeConfig member from option.ts (see the diff ), however that code is still used in createImage.ts, at least in version 1.34.0.

Steps to Reproduce

  1. Upgrade to Cornerstone 1.34
  2. Load a DICOM image (in my case through a stack viewport)

The current behavior

Error: createImage.ts:155 Uncaught (in promise) TypeError: Cannot destructure property 'use16BitDataType' of 'l2' as it is undefined.

The expected behavior

The image should load

OS

Linux

Node version

18.16.1

Browser

Chromium 119.0.6045.159, Firefox 120.0b9

@abustany
Copy link
Contributor Author

For now I can workaround this bug doing the following in my Cornerstone init routine - not sure how safe that is:

  cornerstoneDICOMImageLoader.internal.setOptions({
    strict: false,
    decodeConfig: {
      convertFloatPixelDataToInt: true,
      use16BitDataType: false,
    },
  });

@sedghi
Copy link
Member

sedghi commented Nov 30, 2023

Thanks for the report. @wayfarer3130 I don't think we should have touched this right?

CleanShot 2023-11-30 at 16 58 35

@wayfarer3130
Copy link
Collaborator

@sedghi - yes, that was touched by Chris I think. There was an issue with having it in the decoder rather than in the params on the individual decode that was causing problems.

@sedghi
Copy link
Member

sedghi commented Dec 4, 2023

@abustany Can you create a PR for this and revert the changes?

@abustany
Copy link
Contributor Author

abustany commented Dec 4, 2023

sure, will do

@abustany
Copy link
Contributor Author

abustany commented Dec 5, 2023

ah I missed that #926 also reverts the changes 🙈 oh well, feel free to close #929 then, if #926 gets merged first.

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

No branches or pull requests

3 participants