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
Examples break when using streaming-wadors #149
Comments
Hmmm, so was it working with the |
what I mean is that the examples don't ever use streaming-image-volume-loader. in the all the volume examples, the function createImageIdsAndCacheMetaData is called with an upper case string 'VOLUME' in the examples createImageIdsAndCacheMetaData is called with type parameter as 'VOLUME' (upper case string ) that is evaluated against the constant VOLUME which is 'volume' (lower case).
will always be set to 'wadors:' if I set the createImageIdsAndCacheMetaData to 'volume' then it tries to load images using streaming-wadors. that's when streaming-image-volume-loader fails with the exception provided above. I do have cornerstone external initialized properly as you pointed out. |
I see, yeah this is a bug, but changing the it to Basically the difference between So this subtle bug was creating the image objects but the pixeldata was also inserted into the volume. How do you run the example that you get the error? Maybe check this out https://www.cornerstonejs.org/docs/tutorials/examples |
thanks for looking into it, the problem is with my code then. I'm using Create React App and I don't think webpack is linking the same cornerstone-wado-image-loader module. example: sharedArrayBufferImageLoader uses this dynamic import instead of the alias. https://github.com/cornerstonejs/cornerstone3D-beta/blob/105bd9d97e0df6e67a61c5e13b3393a106ff69d5/packages/streaming-image-volume-loader/src/sharedArrayBufferImageLoader.ts#L7 I tried making an alias for this module but that fails with a different error. |
Thanks for reporting this bug, now our examples are much faster haha I expect that the error don't happen if you don't link anything, right? Look into the OHIF webpack (which is basically ejected version of CRA), to see how we are setting the aliases etc. |
fantastic! I missed the part about dynamic-imports from cornerstoneWadoImageLoader for upgrading to 4.0. Adding the alias for dynamic imports and adding CopyWebpackPlugin to copy to the build folder solved my last issue. My examples are working using streaming-wadors now. Thanks for your help. |
I currently have the same issue. I've also created my React app with 'create-react-app' and get the same error message. Do you mind sharing how did you add the alias and the CopyWebpackPlugin? |
You can refer to here
|
I have already solved the problem on my side. However, CopyWebpackPlugin part in the upgrade guide is outdated and not working anymore as it is. I have created a pull request to fix it. |
Are you still having a problem with this? if so, I can create a bootstrap for Create React App and Cornerstone 3D. |
I was also getting same error while loading Volume with 'streaming-wadors:' . resolve: { But Volume not getting loaded properly and getting error , please see attached pic Thanks |
I ran into an issue while doing the examples and trying to use steaming-wadors
in all the Volume examples, imageIds are created and cached with the createImageIdsAndCacheMetaData helper function and 'VOLUME' (upper case string) for type.
https://github.com/cornerstonejs/cornerstone3D-beta/blob/659888db44ab70d562f7f52872c822feb5c1db03/packages/core/examples/multiVolumeAPI/index.ts#L214
After closer inspection of the helper function you, which prefix is determined here
https://github.com/cornerstonejs/cornerstone3D-beta/blob/main/utils/demo/helpers/createImageIdsAndCacheMetaData.js#L51
but VOLUME constant is
const VOLUME = 'volume';
When I fix the constant to 'VOLUME' the streaming loader fails to initialize with the following exception... "Error: cornerstoneWADOImageLoader requires a copy of Cornerstone to work properly."
The text was updated successfully, but these errors were encountered: