Gibberish images

365 views
Skip to first unread message

Ric Smi

unread,
Feb 6, 2022, 8:01:36 PM2/6/22
to Orthanc Users
Hello All,

I have been using Orthanc for some time along with OHIF viewer, all works well.  My current configuration is, I pass JSON file which has metadata along with url for the instance.

I decided to try Dicom-web but somehow my images are all gibberish. I approached someone at OHIF and he suggested that I should check my Orthanc configuration, maybe something is missing.

Any idea what could be the issue?

Attached are results of same study pulled via Stone-Web and Osimis-Viewer, both works well. Also, attached same study pulled via OHIF which has gibberish result.

My current Orthanc version is 1.9.7, Dicom-web 1.7, GDCM 1.4

Thank you!
Osimis-Viewer.png
OHIF.png
Stone-Web.png
dicomweb.json
orthanc.json

Sébastien Jodogne

unread,
Feb 7, 2022, 12:14:44 AM2/7/22
to Ric Smi, Orthanc Users
Hello,

Please provide a sample (possibly anonymized) DICOM image, as well as your Orthanc logs in "--verbose" mode:

Regards,
Sébastien-


--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/c6b59ba4-ff50-4834-a126-0a07d6a6976an%40googlegroups.com.

Ric Smi

unread,
Feb 7, 2022, 12:00:55 PM2/7/22
to Orthanc Users
Thank you so much Sébastien for the response.

Kindly find log file in verbose mode along with anonymized study.

Best regards,
Rick
Orthanc.log
7609a40f-a8299562-36e387f7-c7cca0ff-0882fcab.zip

Sébastien Jodogne

unread,
Feb 8, 2022, 2:36:35 AM2/8/22
to Orthanc Users
Hello,

I do not see any issue with Orthanc. Let us start Orthanc using Docker as follows:

$ docker run --rm -t -i -p 8042:8042 jodogne/orthanc-plugins:1.9.7

Secondly, let us upload your ZIP file with the sample DICOM files as follows:

$ curl http://orthanc:orthanc@localhost:8042/instances -H 'Expect:' --data-binary @$HOME/Downloads/7609a40f-a8299562-36e387f7-c7cca0ff-0882fcab.zip

Finally, let us call WADO to generate an image (I used the last instance in your logs):

$ curl 'http://orthanc:orthanc@localhost:8042/wado?objectUID=1.2.276.0.7230010.3.1.4.476117791.10792.1644251838.203&requestType=WADO' > /tmp/sample.jpg

You'll find the resulting JPEG file attached to this message, which shows that everything is fine.

Note that you'll have to install the GDCM plugin, because your DICOM instances are using the JPEG2k encoding.

HTH,
Sébastien-
sample.jpg

Luiz Eduardo Guida Valmont

unread,
Feb 8, 2022, 6:57:28 AM2/8/22
to Sébastien Jodogne, Orthanc Users
Hi all

Once I experienced something similar. Been a long time and I'm recounting from memory. These garbled images are kind of preview-ish images browsers display while loading the images.

Maybe, just maybe, there was a hiccup somewhere, be it network, database, etc. Clearing cache and reloading the page should "solve" the problem.

Hth

Luiz


--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.

Sébastien Jodogne

unread,
Feb 8, 2022, 7:10:39 AM2/8/22
to Orthanc Users
Hello Luiz,

Thanks for your comment, but there is no cache for WADO/DICOMweb in Orthanc.

Regards,
Sébastien-

Luiz Eduardo Guida Valmont

unread,
Feb 8, 2022, 11:08:21 AM2/8/22
to Sébastien Jodogne, Orthanc Users
Hi Sébastien

I really meant browser cache. Should have been a bit more explicit. Thanks!

Best,
Luiz

--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.

Ric Smi

unread,
Feb 8, 2022, 11:14:48 PM2/8/22
to Orthanc Users
Dear Sébastien,

Yes, following your steps does produce a sample.jpg file.

I am perplex now. I am using pretty much both OHIF and Orthanc out of box and I don't get proper image if I use DicomWeb.

I don't get any errors on Chrome Console for javascript nor on Network pane. Any suggestion where I should look or what could I do to pin point the issue. Thank you so much!

Following is my server configuration in OHIF for DicomWeb.

dicomWeb: [
      {
        name: 'Orthanc',
        wadoUriRoot: 'http://192.168.86.114:8099/orthanc/wado',
        qidoRoot: 'http://192.168.86.114:8099/orthanc/dicom-web',
        wadoRoot: 'http://192.168.86.114:8099/orthanc/dicom-web',
        qidoSupportsIncludeField: false,
        imageRendering: 'wadors',
        thumbnailRendering: 'wadors',
        enableStudyLazyLoad: true,
        supportsFuzzyMatching: true,
      },
    ]

Best regards,

Sébastien Jodogne

unread,
Feb 9, 2022, 1:39:32 AM2/9/22
to Orthanc Users
Maybe this issue only appears on some specific images from your sample series. You should try to narrow down such specific images.

As a better solution, submit your sample series to the OHIF support team who could help you in this task. Indeed, as far as this forum is concerned, we have not the knowledge about OHIF debugging.

Regards,
Sébastien-

Ric Smi

unread,
Feb 10, 2022, 9:22:17 PM2/10/22
to Orthanc Users
Dear Sébastien,

All the images with following Meta Header produces Gibberish images.

Meta header
0002,0010 (TransferSyntaxUID): 1.2.840.10008.1.2.4.90

I was asked by OHIF member to make sure the response from Orthanc is in the correct compression and that Orthanc is not only serving part of the bytestream?

How do I check that?

Many thanks!

Ric Smi

unread,
Feb 10, 2022, 10:36:04 PM2/10/22
to Orthanc Users
Dear Sébastien,

I have an interesting finding. I am sure you can tell by now that I am serious about this bug :).

I used the Cornerstone example to load my single image from MRI. Then I used the same image using RadiAnt. Files are attached for reference.

You could see this test is without Orthanc involvement. The issue here seems to be in cornerstone routine or maybe the way image is compressed to jp2k.

If for instance the issue is in the compression then why RadiAnt would work and also why direct URI to OHIF would work?

I don't have the answer to this. All I know that when I use Dicomweb to OHIF with jp2k transfer syntax I get gibberish image(s).

Best regards,
Cornerstone.png
Radiant.png

Sébastien Jodogne

unread,
Feb 11, 2022, 1:46:21 AM2/11/22
to Orthanc Users
I have never said you weren't serious about this issue.

Again, please provide one single sample DICOM image with this issue, together with the associated WADO call that is used by OHIF (which is just a URL that you can track in the console of your Web browser):

Having to duplicate your private investigation by myself represents a waste of time, given that you visibly have all the required information at hand.

Ric Smi

unread,
Feb 13, 2022, 10:45:30 PM2/13/22
to Orthanc Users
Dear Sébastien ,

I think I found what causes the issue. We receive studies which are pre-compressed in jp2k before we store them in Orthanc. Those which are compressed via fo-dicom produce gibberish images, only when accessed through DicomWeb protocol. Meanwhile those which are compressed via Gdcm/DCMTK do not produce gibberish images when accessed through DicomWeb protocol.

I have privately sent those studies to you because when I anonymize, ImplementationVersionName changes from fo-dicom 4.0.1 to OFFIS_DCMTK_366 and I wanted to keep things original.

What perplexes me here is that studies which are compressed via fo-dicom produce normal images in OHIF if pulled as a JSON launch, which is my current way of accessing studies. In fact, I use RadiAnt and Weasis on a regular basis on my desktop to view fo-dicom compressed images and they appear to be normal in both the tools.

One resource at OHIF suspect that the metadata I am getting from Orthanc may not be correctly matching the image that OHIF is trying to decide. I am using WADO-RS.

He also suspects that maybe the response from Orthanc is not in the correct compression or its only serving part of the bytestream.

I do not know the answer to these.

What I do know now is what causes the issue. Going forward I can store all the studies compressed only in Gdcm instead of fo-dicom. But how do I fix my history where studies are compressed in jp2k via fo-dicom?

Any thoughts?

Best regards,
OHIF_ServerInfo.json
Orthanc_dicomweb.json

Sébastien Jodogne

unread,
Feb 14, 2022, 2:54:53 AM2/14/22
to Orthanc Users
Dear Ric,

I confirm the reception of your images, unfortunately I'm still unable to reproduce, because you haven't provided the URL that is used by OHIF for its WADO request and that leads to your issue:

I have used the following curl command-line, and everything is fine:

$ curl 'http://orthanc:orthanc@localhost:8042/wado?objectUID=1.2.276.0.7230010.3.1.4.333173554.5108.1644525102.12793&requestType=WADO' > /tmp/sample.jpg

The WADO URL can be found in the console of your Web browser.

Sébastien-

Sébastien Jodogne

unread,
Feb 15, 2022, 4:34:51 AM2/15/22
to Orthanc Users
Dear Ric,

I confirm that I've received your private message containing 2 links to OHIF with problematic images.

By looking at the console of my Web browser, I confirm that I can see that OHIF does not use WADO as you wrote in your first message, but the DICOMweb protocol (more precisely, WADO-RS).

However, I am not a OHIF developer, so I cannot trace down the issue, that most likely occurs within the JavaScript package used by OHIF to decode the JPEG2k images.

Please ask your contact at OHIF to generate me a minimal working example with a problematic DICOMweb WADO-RS request, indicating what Orthanc actually returns versus what OHIF expects. This minimal working example should only use "curl", *not* an actual deployment of OHIF as you pointed me to.

Without this information, I am unable to provide any further guidance.

Regards,
Sébastien-
Reply all
Reply to author
Forward
0 new messages