cornerstonejs / cornerstone3D

Cornerstone is a set of JavaScript libraries that can be used to build web-based medical imaging applications. It provides a framework to build radiology applications such as the OHIF Viewer.
https://cornerstonejs.org
MIT License
565 stars 287 forks source link

Integrating the cornerstone3d examples in a react website #497

Open hugopereiragit opened 1 year ago

hugopereiragit commented 1 year ago

Has anyone tried to implement the examples (https://www.cornerstonejs.org/docs/examples) on a react, angular, vue or any other framework webapp? I'm trying to find some examples for guidance or to follow but I'm struggling.

sedghi commented 1 year ago

Any error you are getting?

jithenece commented 1 year ago

which is the recommended web framework to integrate cornerstone3d-beta and develop custom application? ohif viewer has javascript version of cornerstone. Does it mean angular would be easier choice as it is written in typescript too?

sedghi commented 1 year ago

It should be framework agnostic, OHIF is on React, we know people have used cs3d in Vue and Angular as well successfully

hugopereiragit commented 1 year ago

Any error you are getting?

Yes. I tried to import the following libraries:

import { RenderingEngine, Types, Enums } from '@cornerstonejs/core'; import { initDemo, createImageIdsAndCacheMetaData, setTitleAndDescription, ctVoiRange, } from './utils/demo/helpers';

and placed both the packages and utils folders in the app. But got thousands of errors originating from the files within,. I'm guessing I need more than these 2 files to try to run the examples in a react app?

I refered to these 2 stackoverflow questions to try it. 1 - https://stackoverflow.com/questions/74164728/how-to-integrate-cornerstone-3d-beta-examples-in-angular 2 - https://stackoverflow.com/questions/75770487/how-to-integrate-the-cornerstone3d-examples-in-a-react-app

sedghi commented 1 year ago

If you can come up with re mini repo I can take a look