Comments (11)
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.
from cornerstone3d.
Hmmm, so was it working with the VOLUME
as type you are saying? As the error says you need to pass in the cornerstone to the cornerstoneWADOImageLoader, similar to what we do here
from cornerstone3d.
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).
const prefix = type === VOLUME ? 'streaming-wadors:' : 'wadors:';
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.
from cornerstone3d.
I see, yeah this is a bug, but changing the it to volume
doesn't give me error.
Basically the difference between wadors
and streaming-wadors
image loaders is that wadors
creates the image object, but in the streaming-wadors
which uses SharedArrayBufferImageLoader, it basically goes through the same process just don't create the image object (optimization for speed, since images are inserted into the volume and we don't need the image object basically).
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
from cornerstone3d.
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
'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js';
I tried making an alias for this module but that fails with a different error.
from cornerstone3d.
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.
from cornerstone3d.
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?
from cornerstone3d.
You can refer to here
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?
from cornerstone3d.
You can refer to here
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?
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.
from cornerstone3d.
You can refer to here
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?
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.
from cornerstone3d.
I was also getting same error while loading Volume with 'streaming-wadors:' .
As suggested I have added below config in my webpack , so now I am not getting error 'cornerstoneWADOImageLoader requires a copy of Cornerstone to work properly'
resolve: {
alias: {
'cornerstone-wado-image-loader':
'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js',
},
But Volume not getting loaded properly and getting error , please see attached pic
Thanks
from cornerstone3d.
Related Issues (20)
- Segmentation: How to render or reset viewport when segment removed HOT 1
- [Segmentation] The segmentation becomes stretched in 3D volume Rendering HOT 3
- when Contour type is closed, how to add fillColor HOT 1
- Viewport is too small HOT 6
- How can modify createLinearRGBTransferFunction HOT 1
- Future of @cornerstonejs/dicom-image-loader
- Canvas drawn with tools and save as HOT 2
- [Feature Request] - Cursor automatically shows images in other views HOT 1
- [Bug] Wrong Window Level displayed on wheel stack scroll HOT 5
- [Bug] GetValue in ProbeTool HOT 2
- [Bug] TargetImageIdIndex is not always 100% precise on mousewheel event HOT 1
- [Bug] Gray lines in volume reconstruction HOT 8
- [Bug] Display fault when patient orientation is not axil-aligned HOT 3
- [Bug] zoomtool in mobile HOT 2
- [Bug] use LengthTool in volumeViewport, It report imagePositionPatient not found HOT 7
- [Bug] Setting custom orientation with setCamera gets overwritten HOT 7
- [Bug] Exception "Uncaught (in promise) TypeError: image.imageFrame is undefined" when rendering Image Stack HOT 3
- [Feature Request] how to clear all annotation of target element like the cornerstoneTools.clearToolState(element, toolName); HOT 1
- Fix method invocation failure in VolumeViewport3D due to incorrect viewport type check in AnnotationDisplayTool [Bug] HOT 1
- [Bug] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cornerstone3d.