How to load DICOM data from local in OHIF Viewer?

2.2k Views Asked by At

I went through the docs of OHIF/Viewer. I found that it loads data from https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE. However I want to load it from my local file system so I converted the following code

<script>
    var containerId = "root";
    var componentRenderedOrUpdatedCallback = function(){
      console.log('OHIF Viewer rendered/updated');
    }
    window.OHIFViewer.installViewer(
      {
      // routerBasename: '/',
      servers: {
        dicomWeb: [
          {
            name: 'DCM4CHEE',
            wadoUriRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado',
            qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
            wadoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
            studyInstanceUids: 'MY-DICOM-STUDY-ID',
            qidoSupportsIncludeField: true,
            imageRendering: 'wadors',
            thumbnailRendering: 'wadors',
          },
        ],
      },
    }, containerId, componentRenderedOrUpdatedCallback);
</script>

to ->

<script>
    var containerId = "root";
    var componentRenderedOrUpdatedCallback = function(){
      console.log('OHIF Viewer rendered/updated');
    }
    window.OHIFViewer.installViewer(
      {
      // routerBasename: '/',
      servers: {
        dicomWeb: [
          {
            name: 'DCM4CHEE',
            wadoUriRoot: '/assets/',
            qidoRoot: '/assets/',
            wadoRoot: '/assets/',
            studyInstanceUids: 'MY-DICOM-STUDY-ID',
            qidoSupportsIncludeField: true,
            imageRendering: 'wadors',
            thumbnailRendering: 'wadors',
          },
        ],
      },
    }, containerId, componentRenderedOrUpdatedCallback);
</script>

However, I am unable to see any files.

I have the dir structure as

root/
-public/
--assets/
--js/
--css/
-index.html

1

There are 1 best solutions below

0
On BEST ANSWER

I am not familiar with the actual viewer you are trying to use, but looking at the configuration values - the viewer expects the addresses to point to a server which provides QIDO and WADO DICOM web services. They are not just simple file paths.

QIDO and WADO are RESTful services specified in the DICOM standard. So you should install a server locally, that is capable of providing these services and point your viewer to this server. You also need to import your DICOM images to this server to make them available.