-
Notifications
You must be signed in to change notification settings - Fork 298
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
Conversation
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
packages/dicomImageLoader/examples/customWebWorkerTask/index.html
Outdated
Show resolved
Hide resolved
packages/dicomImageLoader/src/imageLoader/wadors/metaData/getNumberValue.ts
Outdated
Show resolved
Hide resolved
packages/dicomImageLoader/src/imageLoader/wadors/metaData/getValue.ts
Outdated
Show resolved
Hide resolved
packages/dicomImageLoader/src/imageLoader/wadors/metaData/metaDataProvider.ts
Outdated
Show resolved
Hide resolved
packages/dicomImageLoader/src/imageLoader/wadouri/dataset-from-partial-content.ts
Show resolved
Hide resolved
packages/dicomImageLoader/src/shared/decoders/decodeJPEG2000.ts
Outdated
Show resolved
Hide resolved
| 'sopCommonModule' | ||
| string; | ||
|
||
export interface DicomDateObject { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
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
seems like the export defaults are messed up? |
Co-authored-by: James Manners <james@binary.com.au>
* Improve WARORS types as per PR comments * [dicom-image-loader] add types for wasm codec modules * [dicom-image-loader] relocate WASM types --------- Co-authored-by: James Manners <james@binary.com.au>
d4585e5
to
1e6b315
Compare
This will get updated in another PR to use the new dicomImageloader, this PR is just for adding types |
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. |
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?
|
No that one is not typescript yet |
Yes i guess, would be great if you add a PR |
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