DICOM images crash ImageMagick
Posted: 2007-03-08T11:57:08-07:00
I've been using ImageMagick to convert from DICOM digital xrays to JPEG format. However, some DICOM files produce a segmentation fault in ImageMagick, whereas the images load correctly in other DICOM viewers (such as K-Pacs).
I traced the problem down to code in string.c that was dereferencing a null pointer. I patched this, but now I receive an "InsufficientImageDataInFile" error (line 2923, coders/dcm.c). I have tried both the built-in Fedora version (6.2. and the latest online from source code (6.3.3).
Here are three files that crash ImageMagick (but work in DICOM viewers):
http://www.gorgeswebsites.com/test1.dcm
http://www.gorgeswebsites.com/test2.dcm
http://www.gorgeswebsites.com/test3.dcm
Note: the original file names had "1.2.840.114417.0.UID" format, where UID was a long decimal string. And I can get more images from the same DICOM x-ray machine if testers need them.
Thanks in advance for any assistance here. I wonder if the DICOM format has been extended, but ImageMagick hasn't kept pace.
Matt Clark
I traced the problem down to code in string.c that was dereferencing a null pointer. I patched this, but now I receive an "InsufficientImageDataInFile" error (line 2923, coders/dcm.c). I have tried both the built-in Fedora version (6.2. and the latest online from source code (6.3.3).
Here are three files that crash ImageMagick (but work in DICOM viewers):
http://www.gorgeswebsites.com/test1.dcm
http://www.gorgeswebsites.com/test2.dcm
http://www.gorgeswebsites.com/test3.dcm
Note: the original file names had "1.2.840.114417.0.UID" format, where UID was a long decimal string. And I can get more images from the same DICOM x-ray machine if testers need them.
Thanks in advance for any assistance here. I wonder if the DICOM format has been extended, but ImageMagick hasn't kept pace.
Matt Clark