This post is going to be very esoterical, yet I’m writing it for my future self and perhaps for you. So, I was trying to import the MRI of a patient with locally advanced tongue cancer into the Varian Eclipse treatment planning system (version 15.1). Sadly, the import failed with tons of errors of the form:

Unsupported ‘Transfer Syntax UID’ (0002,0010) ‘Explicit Big Endian’.
Could not convert DICOM stream: SOP Instance UID: 1.2.840.113619.2.134…. [MRI]

Quoting from the DICOM standard documentation, Transfer Syntax is a set of encoding rules able to represent one or more abstract syntaxes unambiguously. In particular, it allows communicating applications to negotiate common encoding techniques they both support (e.g., byte ordering, compression, etc.).

So, apparently Varian Eclipse does not like Explicit Big Endian transfer syntax. For the non-tech savvy, when we write the number “123”, we write the most significant digit (e.g. 1) first. This is a big endian representation. If we’d like to write the “123” number in little endian format, we’d write “321”. In order to figure out the supported transfer syntaxes oF Eclipse, I exported the treatment course a random patient, and, in the export’s options dialog, the valid transfer syntaxes were listed as below:

In layman’s terms, the patient’s MRI data are written in big-endian format (e.g. “123”), but Eclipse can only read data written in little-endian format (e.g. “321”). Therefore, we need to convert from big-endian to little-endian.

I tried to do the conversion with dcmconv, but it failed with some not so descriptive errors. I finally gave up on dcmconv and tried gdcmconv. The option -w, that is supposed to decompress a DICOM file, rewrote my files in Explicit VR Little Endian format:

Here you can verify that the 1.2.840.10008.1.2.1 identifier corresponds to little endian format.

Finally, I tried again to import the converted MRI DICOM files and the import succeeded with no errors whatsoever. The MRI images appeared perfectly fine and the simulation CT/MRI image registration process was performed unproblematically.