Page 1 of 1

DICOM, TransferSyntax with BigEndian

Posted: 2014-10-28T08:34:49-07:00
by A.K.
I have prepared DICOM file with BigEndian TransferSyntax [1.2.840.10008.1.2.2] from valid LittleEndian file by dcmconv utility (Linux).

There are programs, reading correclty file structure --- Tags, Values, Lengthes (e.g., matlab, irfanview, ImageJ, gdcmviewer).
Problems occur with Little/Big Endian interpretation of Pixel Data (which seems to depend much on VR=OB or VR=OW).

But ImageMagick fails with "insufficient image data in file `BE.dcm' @ error/dcm.c/ReadDCMImage/3057"

(The problem is irrelevant to -endian flag: byte order is defined by TransferSyntax).

Re: DICOM, TransferSyntax with BigEndian

Posted: 2014-10-28T08:45:18-07:00
by magick
Post a URL so we can download your image and inspect it. If we can reproduce the problem, we'll add a patch to ImageMagick 6.8.9-10 within a few days.

Re: DICOM, TransferSyntax with BigEndian

Posted: 2014-10-28T10:15:04-07:00
by A.K.
LittleEndian, LE2.dcm, normal.
BigEndian, BE2.dcm, unreadable.

Sorry, I did not note ImageMagick versions used (and I shall not be able to do it tomorrow).
Under Linux it was IM, included in Debian distribution.
And it was the recent version, proposed for installation under WinXP.

Re: DICOM, TransferSyntax with BigEndian

Posted: 2014-10-28T18:00:13-07:00
by magick
We can reproduce the problem, we'll need a few days to fix it. The transfer syntax specifies MSB yet the next element is still LSB (0x0002,0x0013) but the next is MSB (0x0008,0x0005).

Re: DICOM, TransferSyntax with BigEndian

Posted: 2014-10-29T00:09:49-07:00
by A.K.
magick wrote:The transfer syntax specifies MSB yet the next element is still LSB (0x0002,0x0013) but the next is MSB (0x0008,0x0005).
Yes, as far as I remember, the metadata block, (0x0002,0x****) should be always written in LittleEndianExplicit;
the rest, starting with (0x0008,0x****), is written in either LSB or MSB, according to specified TransferSyntax, (0x0002,0x0010).

Re: DICOM, TransferSyntax with BigEndian

Posted: 2014-11-01T17:29:40-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-10 Beta, available by sometime tomorrow. Thanks.