Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

Unable to load dicom files.[Urgent]

Open ShankyRana opened this issue 9 years ago • 15 comments

Dicom files loads on local but when running from a hosted site it return with the following error:

uncaught exception: dicomParser.readPart10Header: DICM prefix not found at location 132 - this is not a valid DICOM P10 file.

Unable to figure out what the problem is, both local and live site gets Dicom files from same orthanc server which is also hosted live. Any help is appreciated.

ShankyRana avatar Mar 08 '17 04:03 ShankyRana

Could you provide any more information about the file? Is it a multi-frame image? Could you provide an anonymized version?

swederik avatar Mar 08 '17 13:03 swederik

This problem occurs with all Dicom files i have been using . They work properly on localhost but from live server they don't. Here is the link for anonymized version of a Dicom file i am using: http://www.dicomlibrary.com/?requestType=WADO&studyUID=1.2.826.0.1.3680043.8.1055.1.20170309093927163.498370348.4095933&manage=4e893a33910fdfa675bc0a45af004e00

ShankyRana avatar Mar 09 '17 04:03 ShankyRana

What is the difference between your development and live servers? Is the live server built with 'meteor build'?

swederik avatar Mar 09 '17 09:03 swederik

The file works fine for me. I guess it's not an issue with any of the files, but probably more of your setup. Can you post a screenshot of the Chrome developer console with the requests / responses for images from the server? I would guess you are not actually getting DICOM image data back, and that's why dicomParser can't parse it...

swederik avatar Mar 09 '17 09:03 swederik

No live server is built with Mup. This is the screenshot from live server. screenshot

ShankyRana avatar Mar 09 '17 10:03 ShankyRana

Can you show the network tab? I specifically want to see what is happening with the requests to retrieve the images.

swederik avatar Mar 09 '17 10:03 swederik

It also looks like many of your icons aren't loading, so this could be the same ROOT_URL issue as https://github.com/OHIF/Viewers/issues/57

swederik avatar Mar 09 '17 10:03 swederik

ROOT_URL is already set in production to the ip of the site. This is the network tab screenshot. screenshot2

ShankyRana avatar Mar 09 '17 10:03 ShankyRana

Click on one of the WADO Requests to see what is returned. It says 200 OK but I don't know what the actual response is.

swederik avatar Mar 09 '17 11:03 swederik

Here is the header screenshot for WADO request. screenshot

ShankyRana avatar Mar 09 '17 11:03 ShankyRana

That seems to indicate that the response is of type HTML. What is the response? It should not be HTML, it should be a DICOM image.

If you try to hit the URL on the bottom with cURL, do you get an image back?

swederik avatar Mar 09 '17 13:03 swederik

Response is HTML and after hitting the URL i am getting HTML.

ShankyRana avatar Mar 09 '17 13:03 ShankyRana

We have identified the issue. It seems that some changes to support different ROOT_URLs are breaking things. You can see in your requestURL that there are two slashes (//) after the initial IP. A fix is on the way!

swederik avatar Mar 09 '17 17:03 swederik

Actually, this bug was already fixed with the following code:

https://github.com/OHIF/Viewers/blob/master/Packages/ohif-core/both/utils/absoluteUrl.js#L5-L8

Are you sure that you are using the latest code from master?

evren217 avatar Mar 09 '17 17:03 evren217

Sorry, I was one version behind. Thanks Mate.

ShankyRana avatar Mar 10 '17 06:03 ShankyRana