OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.34k stars 3.36k forks source link

Dicom wado not loading... #32

Closed itcthienkhiem closed 8 years ago

itcthienkhiem commented 8 years ago

Deal ad, I'm loading images from server but not show images use wado, have not response how to fix it. thank so much. capture

itcthienkhiem commented 8 years ago

capture

swederik commented 8 years ago

Hello,

It looks like you need to run the CORS proxy to add the 'Access-Control-Allow-Origin' flag to the header of the request's response. You can take a look at the scripts in the /etc folder, e.g.:

https://github.com/OHIF/Viewers/blob/master/etc/nodeCORSProxy.js

This needs to be run in a separate Terminal using the 'node' command line interface.

The file above will intercept requests to localhost:8043, and send them to localhost:8042, and add the Access-Control-Allow-Origin flag to the header of the response. The configuration value for wadoUriRoot should point to the proxy (i.e. https://github.com/OHIF/Viewers/blob/master/config/orthancDIMSE.json#L7), and the proxy should point to the PACS archive (e.g. Orthanc uses 8042 by default).

You can also read this blog post: http://chafey.blogspot.be/2014/09/working-around-cors.html

We are working to remove the requirement for the separate proxy to make it easier for everyone to get started.

Cheers,

Erik

swederik commented 8 years ago

We have now moved the CORS proxy internally and so the extra step of starting the proxy with Node is no longer required. Can you test this and let me know if it works for you?

Thanks,

Erik

itcthienkhiem commented 8 years ago

hi swederik, it worked with me. thank so much,

swederik commented 8 years ago

Awesome, then I'll close this ticket.