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).
DICOM, TransferSyntax with BigEndian
DICOM, TransferSyntax with BigEndian
Last edited by A.K. on 2014-10-28T13:11:57-07:00, edited 1 time in total.
Re: DICOM, TransferSyntax with BigEndian
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
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.
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
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
Yes, as far as I remember, the metadata block, (0x0002,0x****) should be always written in LittleEndianExplicit;magick wrote:The transfer syntax specifies MSB yet the next element is still LSB (0x0002,0x0013) but the next is MSB (0x0008,0x0005).
the rest, starting with (0x0008,0x****), is written in either LSB or MSB, according to specified TransferSyntax, (0x0002,0x0010).
Re: DICOM, TransferSyntax with BigEndian
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-10 Beta, available by sometime tomorrow. Thanks.