cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.06k stars 598 forks source link

Demo app does not display DICOM P10 files #63

Closed ftaurino closed 8 years ago

ftaurino commented 8 years ago

Hi all,

I've a cornerstone demo app installed on linux, working with no issue. I've also some files, all P10 compliant (verified with dcmftest from dcmtk).

Modifying a json file for a study with these lines

    {
        "seriesUid" : "5",
        "seriesDescription": "PATHOLOGY",
        "seriesNumber" : "5",
        "instanceList" : [
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0012.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0006.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0001.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0004.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0008.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0011.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0005.dcm"},
            {"imageId": "http://localhost:8000/DICOM/WRIST_RIGHT/T1/IM-0001-0003.dcm"}
        ]
    }

the viewer only display a black square. All files are accessible and can be downloaded with a browser. Chrome developer tool console display no errors, but in "network" tab, on the first image, I've a "failed to response data" message. Any ideas?

Is there a way to use plain apache file serving as a store for dicom images and cornerstone demo app? If not, can you give me some hints so I can write a php "wrapper" to serve dicom files without install orthanc or other wado gateways?

Many thanks,

Francesco

chafey commented 8 years ago

Hi Francesco, Yes you can use Apache to serve DICOM files. Please try following the troubleshooting guide here: https://github.com/chafey/cornerstoneWADOImageLoader/wiki/troubleshooting

ftaurino commented 8 years ago

hi chris,

I setup apache with cors (http://enable-cors.org/server_apache.html) and also with corsproxy, but nothing changed. same dicom files served from same apache (with or without corsproxy) are usable with dwv viewer, but I think cornerstone is better suited for my project. I'll try to debug the http transfer with tshark or some other low level network tools...

thank you and have a nice day,

francesco

chafey commented 8 years ago

If the images display fine in DWV then the problem is not with your apache configuration. I suspect your ImageIds are not correct - to load DICOM images you must use the cornerstoneWADOImageLoader which uses the 'wadorui' scheme in the imageId. You are using the http scheme which maps to the cornerstoneWebImageLoader which is used for non DICOM images like PNG, JPEG, etc.

ftaurino commented 8 years ago

I've tried with "wadouri:http://...." with no luck.

ftaurino commented 8 years ago

now it works! raw dicom files from a php script (with ob_clean) from the same web server, with "dicomweb:/path/to/dicom/file" in json list.

thank you for this great programs!