cornerstonejs / react-cornerstone-viewport

Cornerstone medical image viewport component for React
https://react.cornerstonejs.org/
MIT License
96 stars 75 forks source link

Dynamically load and render local DICOM images #156

Open sebastianandress opened 1 year ago

sebastianandress commented 1 year ago

I'm trying to dynamically load local DICOM images as shown in this codesandbox: https://codesandbox.io/s/silent-feather-mv97ee?file=/src/App.tsx

Unfortunately, it seems that it does not load or render the local data correctly. I think the issue lies in loading the data, however following this example the following code should (but does not) do the job:

const image = cornerstoneWADOImageLoader.wadouri.fileManager.add(file);
imageIds.push(image)
<CornerstoneViewport imageIds={imageIds}/>

Thanks for your help!