Search code examples
javascriptreactjsamazon-web-servicesamazon-s3dicom

Load a dicom file with cornerstone js from an S3 bucket in AWS


I need to load an image from a dicom file stored in an S3 bucket in AWS. I am using cornerstone js with reactjs.

I know how to load the images from my local directory, but I dont know how to retrieve them from the cloud. I have looked for solutions, but non of them have worked for me.


Solution

  • You should use the cornerstoneWADOImageLoader to load the DICOM image into the cornerstone viewer.

    This will allow you to use a URL to load the DICOM file You can check the example here by directly pasting the link from your AWS S3, just make sure that CORS is enabled and it is accessible in AWS: https://rawgit.com/cornerstonejs/cornerstoneWADOImageLoader/master/examples/wadouri/index.html

    The example source code can be found here: https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/examples/wadouri/index.html