You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite + vue3
When I attempted to convert the contour segmentation to labelmap segmentation using the example Convert contour segmentation to stack labelmap as a reference, an error occurred. The error message is: Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
I made efforts to troubleshoot this issue. I suspect that the problem might lie in the file /node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/polySeg/registerPolySegWorker.js
I made an attempt to modify the path, as shown in the following image:
After changing the path, the error changed. Here's an image of the new error state:
Furthermore, after experimenting with vite-plugin-wasm, the error changed again, as shown in the image below:
exportdefaultdefineConfig({assetsInclude: ["**/*.wasm"],plugins: [react(),viteCommonjs()],// seems like only required in dev mode, there is an issue with vite import.meta.url// in dev mode see https://github.com/vitejs/vite/issues/8427optimizeDeps: {exclude: ["@cornerstonejs/dicom-image-loader","@cornerstonejs/tools"],include: ["dicom-parser","xmlbuilder2"],},worker: {format: "es",},})
@sedghi Thank you for your reply. It's really helpful. This configuration has solved the package reference issue.
However, there are still some problems with the type conversion of segmentation in my project. There is no error reported, but the corresponding labelmap data does not appear in the converted viewport. I will try again.
I would like to know if you will develop a method to directly convert a certain segmentation from Contour to Labelmap in one viewport in your future development plan.
Describe the Bug
Vite + vue3

When I attempted to convert the contour segmentation to labelmap segmentation using the example Convert contour segmentation to stack labelmap as a reference, an error occurred. The error message is:
Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
I made efforts to troubleshoot this issue. I suspect that the problem might lie in the file

/node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/polySeg/registerPolySegWorker.js
I made an attempt to modify the path, as shown in the following image:

After changing the path, the error changed. Here's an image of the new error state:
Furthermore, after experimenting with vite-plugin-wasm, the error changed again, as shown in the image below:
I've configured my project according to the guidelines in vue-angular-react-etc
Steps to Reproduce
1.load stack image use wadouri
2.use LinearSplineROI draw segmentation
3.change segmentation from contour to labelmap
await segmentation.addSegmentationRepresentations(viewportId, [ { segmentationId: segmentationId, type: csToolsEnums.SegmentationRepresentations.Labelmap } ])
4.use brush tool
The current behavior
d
The expected behavior
d
OS
d
Node version
d
Browser
d
The text was updated successfully, but these errors were encountered: