Orthanc prefers uncompressed TransferSyntax

Hello,

I cannot transfer compressed images from Orthanc to OsiriX via C-GET.
Orthanc always prefers an uncompressed transmission, even though…

  • JPEG LS Lossless is configured as accepted transfer-syntax in Orthanc
  • all instances are compressed as JPEG LS Lossless in OrthancStorage
  • OsiriX is configured to prefer “JPEG LS Lossless - only”

I would expect that Orthanc picks JPEG LS Lossless under these conditions, but it doesn’t.
Is this by design or a bug or did I configured it wrong?

Thanks in advance
Björn

Here are some further details…

I’ve been using OsiriX 12.5.2 64 bit for testing and the official macOS-package…

bjoern@mac23 orthanc-evaluation % ./Orthanc-OSX-22.9.1-stable/Orthanc --version
./Orthanc-OSX-22.9.1-stable/Orthanc 1.11.2

A minimal configuration to produce this effect (which might be buggy):

{
// Simplify permissions for testing
“DicomAlwaysAllowFind” : true,
“DicomAlwaysAllowGet” : true,

// Accept “Implicit VR Little Endian” (mandatory), “Explicit VR Little Endian” and “JPEG LS Lossless”
“AcceptedTransferSyntaxes” : [ “1.2.840.10008.1.2”, “1.2.840.10008.1.2.1”, “1.2.840.10008.1.2.4.80” ],

// Transcode all inbound transmissions with “JPEG LS Lossless”
“IngestTranscoding”: “1.2.840.10008.1.2.4.80”,

// below are defaults set by Osimis…

// orthanc configuration file reference: available here:
// https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Configuration.json
“Name” : “MyOrthanc”,

// Orthanc Explorer 2 configuration. Reference available here:
// https://github.com/orthanc-server/orthanc-explorer-2/blob/master/Plugin/DefaultConfiguration.json
“OrthancExplorer2” : {
“Enable”: true,
“IsDefaultOrthancUI”: false
}
}

For a test I’ve imported one MRI study into Orthanc (send by OsiriX), which has been transcoded correctly:

bjoern@mac23 orthanc-evaluation % rm /tmp/ts.txt
bjoern@mac23 orthanc-evaluation % find Orthanc-OSX-22.9.1-stable/OrthancStorage -type f | while read f; do gdcminfo “$f” | grep “TransferSyntax is”; done >> /tmp/ts.txt
Failed to read: Orthanc-OSX-22.9.1-stable/OrthancStorage/index-wal
Failed to read: Orthanc-OSX-22.9.1-stable/OrthancStorage/index-shm
Failed to read: Orthanc-OSX-22.9.1-stable/OrthancStorage/index
bjoern@mac23 orthanc-evaluation % wc -l /tmp/ts.txt
4209 /tmp/ts.txt
bjoern@mac23 orthanc-evaluation % sort -u /tmp/ts.txt TransferSyntax is 1.2.840.10008.1.2.4.80 [JPEG-LS Lossless Image Compression]

But when I fetch it via C-GET then Orthanc picks Explicit Little Endian and decompresses the whole study - see attached trace.
I also tried this setting w/o effect (on the C-GET SCP):

“DicomScuPreferredTransferSyntax” : “1.2.840.10008.1.2.1”,

config.json (905 Bytes)

orthanc.log.gz (357 KB)

I did some further testing: compression via C-MOVE works as expected (in opposite to C-GET).
Basically I used the same Orthanc configuration as before, just with an additional entry in DicomModalities for my workstation.
And of course I had to update the node in OsiriX and swap C-GET with C-MOVE.
So either C-GET requires other compression-related settings (which I couldn’t find in the default config) or there must be a bug in Orthanc.

Hi Björn,

I could reproduce your issue with this dcmtk command and a pynetdicom script:
getscu -d +xt -S -k “QueryRetrieveLevel=Study” -k “StudyInstanceUID=1.2.276.0.7230010.3.1.2.2344313775.14992.1458058359.6811” localhost 4244

With the pynetdicom script, I was able to implement a GetSCU which proposed only the JpegLS Transfer Syntax → it was used correctly by Orthanc. As soon as GetScu proposed multiple transfer syntaxes including LittleEndianExcplicitVR, LittleEndianExcplicitVR was always selected, no matter the order proposed by GetSCU. To me, this is indeed an incorrect behaviour.

This has now been fixed with this patch: https://hg.orthanc-server.com/orthanc/rev/80ac0955e4e7

In my understanding, this affects all C-Store SCU operations, not only the C-Store SCU that is issued as a response to C-Get.

Best regards,

Alain.