Comments (2)
Did you ever get this fixed?
Looks like the problem I see is that you can't use async functions like that within reacts useEffect hook.
Define the async function inside the hook.
useEffect(() => {
// what happens in vegas (in the promise) stays in vegas
const render = async() => {
...
}
render()
},[viewportRef1])
same goes for the init of cornerstone.
from cornerstone3d.
It has been a while since I've fixed the issue but I think the issue was related to the faulty/missing installation of cornerstoneWADOImageLoader.
Here is what I did if someone is having a similar issue. I was initially using CRA but realized that I need to make some changes to the webpack.config.js
file to install cornerstoneWADOImageLoader properly. I started a fresh project and created the webpack.config.js
file manually. The important point is adding the following property to the webpack.config.js
file:
resolve: {
alias: {
"cornerstone-wado-image-loader": "cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js"
}
}
You also need the CopyWebpackPlugin
installed and added to the config file. The tricky thing here is that the documentation of cornerstoneWADOImageLoader is faulty. You need to add the following property to the config file:
plugins: [
new CopyWebpackPlugin(
{
patterns: [
{
from: path.resolve(__dirname, './node_modules/cornerstone-wado-image-loader/dist/dynamic-import'),
to: "../dist",
},
]
})
],
Be mindful that "to" here should point to your build folder, make sure other paths are correct as well
from cornerstone3d.
Related Issues (20)
- [Feature Request] How to display Contour Segmentation in SAGITTAL?
- [Bug] Eraser Tool not working
- [Bug] CT images from localhost are rendered incorrectly
- [Bug] setPetColorMapTransferFunctionForVolumeActor
- [Bug] Wall of warnings when building app with vite HOT 7
- [Bug] vite + vue3 + worker + wasm HOT 4
- [Bug] @cornerstonejs-CWnWevAx.js:171 Uncaught ReferenceError: Cannot access 'kL' before initialization HOT 1
- [Bug] StackViewport alone with VolumeViewport3D breaks images rendered in StackViewport HOT 2
- [Bug] Overlay Data display error
- [Bug] Volume is being added on Axial orientation in certain cases.
- [Bug] Trying to Set color of AnnotationTool's new Annotation HOT 1
- [Bug] rendering is white HOT 4
- [Bug] New version report exception
- [Bug] Uncaught (in promise) TypeError: Cannot destructure property 'pixelRepresentation' of 'metaData_exports.get(...)' as it is undefined. HOT 2
- Segmentation tool doesn't show segments has Labelmap index over 255 HOT 2
- [Bug] With Webpack setToolActive throws "Cannot read properties of undefined (reading 'renderViewport')" on stack viewport HOT 1
- Crosshair position synchronization to volume3D HOT 1
- [Bug] SplineContourSegmentationTool and LivewireContourSegmentationTool must end drawing when switching to other tools HOT 3
- [Bug] Copy annotation from stack viewport to another stack viewport(s) with different series (for Time-intensity curves) HOT 2
- [Bug] StackViewport with VolumeViewport3D breaks images rendered in StackViewport & VolumeViewport3D 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.