Page 1 of 1

DICOM image corrupted

Posted: 2013-09-21T17:41:46-07:00
by Malvineous
Hi all,

I am trying to convert a DICOM image of an x-ray into a more common format, but I can't get it to work with ImageMagick. Using "convert" produces a tiny image that is obviously not correct.

GIMP is able to read the image correctly, except that every second pixel has been swapped with its neighbour so the image still isn't perfect.

Here is the image in question: http://www.shikadi.net/pics/example.dcm (3MB)

The command I am using is "convert example.dcm out.png". ImageMagick thinks the file is only 128x67 while GIMP converts it as 2440x1292.

Code: Select all

$ identify example.dcm 
example.dcm DCM 128x67 128x67+0+0 8-bit sRGB 3.157MB 0.000u 0:00.000

$ identify --version
Version: ImageMagick 6.8.6-9 2013-08-29 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC HDRI OpenCL OpenMP
Delegates: bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pango pangocairo png ps png rsvg tiff webp wmf x xml zlib

Re: DICOM image corrupted

Posted: 2013-09-22T00:54:41-07:00
by dlemstra
Commander Keen is telling me that he cannot find your file. Could you please fix your link so we can investigate the problem?

Re: DICOM image corrupted

Posted: 2013-09-23T03:20:57-07:00
by Malvineous
Apologies for that - I happened to be moving servers and missed copying the most recent files over. Should be fixed now.

Re: DICOM image corrupted

Posted: 2013-09-23T04:28:10-07:00
by dlemstra
Your link works again, is 2440x1292 the expected resolution?

Re: DICOM image corrupted

Posted: 2013-09-23T13:42:57-07:00
by Malvineous
I'm not 100% sure what the correct resolution is, but GIMP produces an image that looks like it's the right size at 2440x1292. I can't say whether it is 1:1 at this resolution or whether it is magnified, because the swapped pixels make it look a bit odd.