-
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
[Bug] decodeImageFrameWorker.js file does not exist, volumeLoader.loadVolume promise not resolving #1538
Comments
Yeah something is going on with Angular, our recipes for vite, react and vue, nextjs works https://www.cornerstonejs.org/docs/getting-started/vue-angular-react-etc see if you can take something out of them, i see our angular recipe does not work as i see |
Any updates? |
Angular uses Vite, and our Vite setup functions in both development and build modes, so please adjust to Angular accordingly. |
I'm in the process of migrating from the old Cornerstone version and rendering stack images, but I'm still encountering the same error. Is there any update on making it compatible with Angular? I hope Cornerstone will provide official support for Angular projects in the future as well |
@sedghi is there any update? Thanks in advance |
No angular update unfortunatelly |
I apologize for any misunderstanding earlier. I just wanted to clarify is Cornerstone3D will discontinue support for Angular? If that’s the case, would it still be possible to use the legacy Cornerstone version for an extended period? I am a bit unclear about the details and would appreciate your guidance. |
We need community contributions here. We've made it compatible with Vue, React, and anything Vite-based. However, Angular has migrated their CLI to Vite without allowing configuration. What can I say? Something you can do is to create an issue on their GitHub and say this library works with everything else except Angular. |
@sedghi The issue lies within |
I have resolved the issue for Angular CLI. Someone already made a pull request to fix the problem at cornerstonejs/angular-cornerstone3d#2 |
Can you post your solution here? |
@sedghi The error no longer appear in the console, but the image appear in grey. So it is not entirely fixed. The code seem start fetching the image, but fail to display, and only display a grey rectangle. And a bunch of warning |
Describe the Bug
I am seeing issues since upgrading to Cornerstone 2.1.5 and trying to follow the migration guide. I am running using Angular 18 for the front-end framework.
When initializing the Cornerstone DICOM Image Loader, it cannot find the decodeImageFrameWorker.js file. I have the following code for initialization.
For every webworker, I then get the following message in the console:
The file does not exist at "C:/cornerstone-test/.angular/cache/18.2.11/cornerstone-test/vite/deps/decodeImageFrameWorker.js?worker_file&type=module" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude\`.
When my code later reaches the volume loader and tries to load a volume, it hangs forever. The promise returned from the
loadVolume
function never resolves nor errors out.I am registering the volume loader and then trying to load my volume like this
I suspect that the issues are related - the volume loader likely can't load the volume because the Cornerstone DICOM image loader didn't initialize correctly. When I revert back to Cornerstone 1.86, neither of these issues occur.
Steps to Reproduce
The current behavior
Initializing the cornerstoneDICOMImageLoader is resulting in console messages saying that it cannot find the decodeImageFrameWorker.js file.
The file does not exist at "C:/cornerstone-test/.angular/cache/18.2.11/cornerstone-test/vite/deps/decodeImageFrameWorker.js?worker_file&type=module" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
Trying to then load a volume with the volume loader returns a promise object that never resolves and never errors out.
The expected behavior
The decodeImageFrameWorker.js file should be found and the volume loader's promise should either resolve or throw an error.
OS
Windows 11
Node version
20.15.1
Browser
Chrome 130.0.6723.70
The text was updated successfully, but these errors were encountered: