orthanc-web, wado-rs request / mime response

796 views
Skip to first unread message

MarkusR

unread,
Sep 26, 2018, 12:31:20 PM9/26/18
to Orthanc Users
Hello,

It appears that the Orthanc-web plugin returns the dicom file wrapped in a MIME header. When I query a couple other DICOM servers I receive the raw DICOM file.

Is this a standard? Are DICOM clients going to expect/handle the MIME file?

>curl http://<server>/api/studies/2.16.124.113543.6021.1.1.2684016975.24736.1536256719.1/series/2.16.124.113543.6021.1.2.2684016975.24736.1536256720.3/instances/2.16.124.113543.6021.1.3.2684016975.24736.1536256720.7 --output mydicom2.dcm

-Markus
Message has been deleted

MarkusR

unread,
Sep 26, 2018, 5:09:12 PM9/26/18
to Orthanc Users

Sébastien Jodogne

unread,
Sep 27, 2018, 1:11:03 AM9/27/18
to Orthanc Users
Hello,

Check out the specification of WADO-RS (DICOMweb):

As can be seen from this specification, the return type is always "multipart/related":

This means that WADO-RS servers must return a sequence of DICOM files encapsulated within MIME headers, which is precisely what you observed.

To retrieve one single DICOM file without the MIME headers, you can use the URI "/instances/{...}/file" in the custom REST API of Orthanc:

HTH,
Sébastien-

MarkusR

unread,
Sep 27, 2018, 7:37:28 PM9/27/18
to Orthanc Users
Thanks Sebastian!

A follow up question...

So in WADO-RS there is no way to get a raw image/frame, using curl, for example. It will always come back in MIME format?

WADO-URI (WADO) is the only way to preview images or download raw DICOM files?

- Markus

Sébastien Jodogne

unread,
Sep 28, 2018, 2:51:33 AM9/28/18
to Orthanc Users
Hello,

Yes, according to the DICOMweb specification, all the WADO-RS primitives return multipart answers (except the "WADO-RS - Retrieve Rendered Transaction" endpoint, but the latter cannot be used to retrieve the raw DICOM instances).

However, I have indeed forgotten to mention the fact that WADO-URI can be used to retrieve the DICOM instances. WADO-URI is also implemented by the Orthanc DICOMweb plugin. Here is a working example:


The parameter "objectUID" corresponds to the DICOM tag "SOPInstanceUID" of the instance you wish to download. The value of this "SOPInstanceUID" tag can be retrieved from a QIDO-RS lookup:

Note that other DICOMweb servers than Orthanc might require you to provide the "studyUID" and "seriesUID" arguments as well, that respectively correspond to the "StudyInstanceUID" and "SeriesInstanceUID" tags of the instance of interest.

As a final note, you can find implementation notes for the WADO-URI part of the DICOMweb plugin at the following address:

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