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

feat(dicomImageLoader types): Add types to the dicom image loader #441

Merged
merged 25 commits into from
Mar 3, 2023

Conversation

sedghi
Copy link
Member

@sedghi sedghi commented Feb 21, 2023

Shout-out to @jmannau and his team at Pliny for their awesome work on the TypeScript addition to the cornerstoneWADOImageLoader. They were a crucial part of this PR for adding types to this project and their hard work made my job so much easier, which was mostly copy pasting.


Todo

Seems like the ESM build does not work properly with the codecs "exports".
As per my investigation, the moduleResolution in the tsConfig is "node" which is basically "node10" and not newer node versions that supports "export".

See these references

@netlify
Copy link

netlify bot commented Feb 21, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 0192389
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/64016c0cc5184a0008fcc1c8
😎 Deploy Preview https://deploy-preview-441--cornerstone-3d-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 settings.

@sedghi sedghi changed the title feat(dicomImageLoader): Add types to the dicom image loader feat(dicomImageLoader types): Add types to the dicom image loader Feb 21, 2023
@sedghi sedghi mentioned this pull request Feb 22, 2023
| 'sopCommonModule'
| string;

export interface DicomDateObject {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is getting retrieved/parsed, we should always get it as a combined date/time object. Splitting it up causes all sorts of issues. If we are going to not parse, then just leaving the value as a string is preferred.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is referenced in the MetadataGeneralSeriesModule what should I do?

Copy link
Collaborator

@wayfarer3130 wayfarer3130 left a comment

Choose a reason for hiding this comment

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

Needs some updates still, but quite close.

@sedghi
Copy link
Member Author

sedghi commented Feb 27, 2023

There seem to be a lot of weird stuff happening for the esm build. The esm builds fine, but using the build inside OHIF (branch here https://github.com/OHIF/Viewers/tree/feat/dicomImageLoader) has the following error

@ohif/viewer: WARNING in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeHTJ2K.js 16:23-34
@ohif/viewer: export 'default' (imported as 'openjphWasm') was not found in '@cornerstonejs/codec-openjph/dist/openjphjs.wasm' (possible exports: $, Q, R, S, T, U, V, W, X, Y, Z, _, aa, ba, ca, da, ea)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decodeImageFrame.js 9:0-49 76:28-39
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 4:0-58 20:29-45
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: WARNING in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEGBaseline8Bit.js 11:31-50
@ohif/viewer: export 'default' (imported as 'libjpegTurboFactory') was not found in '@cornerstonejs/codec-libjpeg-turbo-8bit/dist/libjpegturbowasm_decode' (possible exports: K, L, M, N, O, P, Q, R, S, T, U, V, W)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decodeImageFrame.js 4:0-71 33:28-50
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 4:0-58 20:29-45
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: WARNING in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEGLS.js 21:23-42
@ohif/viewer: export 'default' (imported as 'charlsWasm') was not found in '@cornerstonejs/codec-charls/dist/charlswasm_decode.wasm' (possible exports: A, B, C, D, E, F, G, H, I, J, z)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 2:0-81 9:8-24
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: WARNING in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEG2000.js 16:23-44
@ohif/viewer: export 'default' (imported as 'openjpegWasm') was not found in '@cornerstonejs/codec-openjpeg/dist/openjpegwasm_decode.wasm' (possible exports: E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 1:0-85 8:8-26
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: WARNING in InjectManifest has been called multiple times, perhaps due to running webpack in --watch mode. The precache manifest generated after the first call may be inaccurate! Please see https://github.com/GoogleChrome/workbox/issues/1790 for more information.
@ohif/viewer: WARNING in /app.js is 16.7 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
@ohif/viewer: WARNING in /app.js.map is 15.8 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeHTJ2K.js 1:0-73
@ohif/viewer: Module not found: Error: Package path ./dist/openjphjs is not exported from package /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-openjph (see exports field in /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-openjph/package.json)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decodeImageFrame.js 9:0-49 76:28-39
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 4:0-58 20:29-45
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEGBaseline8Bit.js 2:0-105
@ohif/viewer: Module not found: Error: Package path ./dist/libjpegturbowasm_decode.wasm is not exported from package /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-libjpeg-turbo-8bit (see exports field in /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-libjpeg-turbo-8bit/package.json)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decodeImageFrame.js 4:0-71 33:28-50
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 4:0-58 20:29-45
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEGLS.js 1:0-79
@ohif/viewer: Module not found: Error: Package path ./dist/charlswasm_decode is not exported from package /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-charls (see exports field in /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-charls/package.json)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 2:0-81 9:8-24
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEG2000.js 1:0-83
@ohif/viewer: Module not found: Error: Package path ./dist/openjpegjs_decode is not exported from package /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-openjpeg (see exports field in /Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-openjpeg/package.json)
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 1:0-85 8:8-26
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/codec-charls/dist/charlswasm_decode.wasm 
@ohif/viewer: Module not found: Error: Can't resolve 'a' in '/Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-charls/dist'
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEGLS.js 2:0-81 21:23-42
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 2:0-81 9:8-24
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/codec-libjpeg-turbo-8bit/dist/libjpegturbowasm_decode.wasm 
@ohif/viewer: Module not found: Error: Can't resolve 'a' in '/Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-libjpeg-turbo-8bit/dist'
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEGBaseline8Bit.js 1:0-103 11:31-50
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decodeImageFrame.js 4:0-71 33:28-50
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 4:0-58 20:29-45
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/codec-openjpeg/dist/openjpegwasm_decode.wasm 
@ohif/viewer: Module not found: Error: Can't resolve 'a' in '/Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-openjpeg/dist'
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeJPEG2000.js 2:0-87 16:23-44
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 1:0-85 8:8-26
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20
@ohif/viewer: ERROR in ../../../node_modules/@cornerstonejs/codec-openjph/dist/openjphjs.wasm 
@ohif/viewer: Module not found: Error: Can't resolve 'a' in '/Users/alireza/dev/admin/Viewers.git/feat/dicomImageLoader/node_modules/@cornerstonejs/codec-openjph/dist'
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decoders/decodeHTJ2K.js 2:0-75 16:23-34
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/shared/decodeImageFrame.js 9:0-49 76:28-39
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/decodeTask.js 4:0-58 20:29-45
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/webWorker/index.worker.js 2:0-38 3:20-30
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/webWorkerManager.js 1:0-66 80:23-48
@ohif/viewer:  @ ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/src/imageLoader/index.js 13:0-65 35:4-20 39:0-350
@ohif/viewer:  @ ../../../extensions/cornerstone/src/utils/dicomLoaderService.js 9:0-65 92:13-53
@ohif/viewer:  @ ../../../extensions/cornerstone/src/index.tsx 24:0-60 131:8-26
@ohif/viewer:  @ ./pluginImports.js 10:0-54 25:16-27
@ohif/viewer:  @ ./index.js 20:0-76 21:0-18 22:2-20

seems like the export defaults are messed up?

sedghi and others added 13 commits February 28, 2023 21:29
@sedghi
Copy link
Member Author

sedghi commented Mar 1, 2023

Examples don't run in the deploy preview, need to investigate that https://deploy-preview-441--cornerstone-3d-docs.netlify.app/

This will get updated in another PR to use the new dicomImageloader, this PR is just for adding types

@sedghi sedghi merged commit 10a3370 into main Mar 3, 2023
@TardigradeX
Copy link

I just tried to use cornestoneDicomImageLoader in my project, but there are no type files available. The compiler does not find them, and I also cant find them in the node_modules folder.

I see here, that in the last commit 0192389129

everything was reverted to the old cornerstoneWADOImageLoader without TS support.
Is this the case? does the cornestoneDicomImageLoader not work at the moment? If yes the documentation should be updated.

@justinsolomon
Copy link

I just tried to use cornestoneDicomImageLoader in my project, but there are no type files available. The compiler does not find them, and I also cant find them in the node_modules folder.

I see here, that in the last commit 0192389129

everything was reverted to the old cornerstoneWADOImageLoader without TS support. Is this the case? does the cornestoneDicomImageLoader not work at the moment? If yes the documentation should be updated.

I am having a similar issue. Trying to use the cornerstone suite of tools in an angular application to load + view local DICOM files. I was able to install the core and tools packages and they seem to be working. But my IDE is giving an error when trying to import dicom-image-loader. Does this package work with typescript?

Could not find a declaration file for module '@cornerstonejs/dicom-image-loader'. '.../node_modules/@cornerstonejs/dicom-image-loader/dist/cornerstoneDICOMImageLoader.bundle.min.js' implicitly has an 'any' type. Try npm i --save-dev @types/cornerstonejs__dicom-image-loaderif it exists or add a new declaration (.d.ts) file containingdeclare module '@cornerstonejs/dicom-image-loader';`

@sedghi
Copy link
Member Author

sedghi commented Feb 20, 2024

No that one is not typescript yet

@justinsolomon
Copy link

Ok thanks for the info. Perhaps the documentation should be updated then?
image

@sedghi
Copy link
Member Author

sedghi commented Feb 20, 2024

Yes i guess, would be great if you add a PR

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.

5 participants