Orthanc crashes when calling WADO with transcoding

Hi Authors,

I am running Orthanc 1.8.0, DicomWeb plugin version 3, when I call this url in Postman

with header
Accept: multipart/related; type=image/jpeg; transfer-syntax=1.2.840.10008.

Orthanc service crashed. Below is the log file when running in verbose mode

I1203 17:03:53.161651 OrthancPlugins.cpp:1815] Delegating HTTP request to plugin for URI: /dicom-web/studies/1.2.826.0.1.3680043.10.96507826537626540129244984210872342496/series/
I1203 17:03:53.162399 OrthancPlugins.cpp:2388] Plugin making REST GET call on URI /instances/a2e860a5-782cb8d4-258d9080-b6d02066-3f940755/series (built-in API)
I1203 17:03:53.163233 OrthancPlugins.cpp:2388] Plugin making REST GET call on URI /instances/a2e860a5-782cb8d4-258d9080-b6d02066-3f940755/study (built-in API)
I1203 17:03:53.163429 OrthancPlugins.cpp:2388] Plugin making REST GET call on URI /instances/a2e860a5-782cb8d4-258d9080-b6d02066-3f940755/file (built-in API)
I1203 17:03:53.163516 FilesystemStorage.cpp:144] Reading attachment “70557791-1bb8-4a87-9777-ce10deb45b9a” of “DICOM” content type
I1203 17:03:53.164013 PluginsManager.cpp:172] DICOMweb RetrieveFrames on a2e860a5-782cb8d4-258d9080-b6d02066-3f940755, frames: 1
I1203 17:03:53.164046 PluginsManager.cpp:172] DICOMweb RetrieveFrames: Transcoding instance a2e860a5-782cb8d4-258d9080-b6d02066-3f940755 to transfer syntax 1.2.840.10008.
DCT coefficient out of range

I think Orthanc should catch this exception instead of letting itself die. The attachment is the dicom file I used. Can you identify if this is intentional ?

70557791-1bb8-4a87-9777-ce10deb45b9a.dcm (516 KB)


Thanks for your analysis. The problem is related to the GDCM transcoder plugin, not to DICOMweb or to the Orthanc core.

For future reference, here is a more direct way to reproduce your issue, without relying on DICOMweb:

$ curl http://localhost:8042/instances/a2e860a5-782cb8d4-258d9080-b6d02066-3f940755/modify -d ‘{“Transcode”:“1.2.840.10008.”}’

The problem comes from the GDCM toolkit, to which I have just send a bug report:

As a temporary workaround to prevent this crash in Orthanc, I have committed a changeset in the Orthanc GDCM plugin to explicitly prevent any conversion of 16bit images to the 1.2.840.10008. transfer syntax:

This protection is pending in the mainline of the Orthanc GDCM plugin, and will be part of forthcoming 1.2 release of this plugin.