Conversion of DCM-Files with multiple images fails

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
DreamCatcher

Conversion of DCM-Files with multiple images fails

Post by DreamCatcher »

Hello to everyone,

when i tried to convert a DCM-File with multiple images to an mpeg or extract all images as png, bmp or jpeg i got the following error message:

Code: Select all

convert: Invalid colormap index `multiple_image.dcm' @ ..\..\magick/color-private.h/ConstrainColormapIndex/42.
I used the following command to convert the DCM-Files:

Code: Select all

convert multiple_image.dcm test%03d.bmp
The ImageMagic-Version is: ImageMagick-6.4.5-8-Q16-windows-dll.exe

The result i got has nothing to do with the original dcm image. Most of the video/images is black and only partial fragments of the sources are in the result images. I tried the same with version 6.2.7 and the result was as expected. Contains the dcm-file only one image everything is fine. Just DCMs with multiple images are affected.
I think there is a bug in version 6.4.5. If you need further information, i try to provide them.

Kind regards,
DreamCatcher
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion of DCM-Files with multiple images fails

Post by magick »

Can you post a URL to one of your DCM images and the command you use. We need to download the image and reproduce the problem and we will have a fix within a day or two. Thanks.
DreamCatcher

Re: Conversion of DCM-Files with multiple images fails

Post by DreamCatcher »

Sorry that it take me so a long time to answer, but i needed to clear some things before i could upload the file.

The link to the file is:
http://www.fileuploadx.de/124797

As stated previously the command we used to extract the images is:

Code: Select all

convert multiple_images_inOneFile.dcm test%03d.bmp
I don't know if it is related, but i think i found another glitch converting a single dicom image:
After the conversation the image has a completly different histogram, i will say the color value of the dcm and the bmp are completly different. In an extrem case it we got an result image with only black pixel, it lost all image information. During the conversation we got the same error message i mentioned in my first post.

I thank you very much for your help,

Kind regards,
DreamCatcher
newmagickuser

Re: Conversion of DCM-Files with multiple images fails

Post by newmagickuser »

Hi all.
First of all i'd like to thank u for all your work.
I'm a quiet new imagemagick user and I'm trying to understand all the possibilities offered by your software.

But in my fist use of it I had the same problem posted by Dreamcatcher with some differences!

I use Imagemagick (last version downloaded from your project's homepage) in a Mac Leopard system and in a Windows system.

I have the "Invalid colormap" error in some DICOM images in Windows but I get the same error in ALL DICOM images in my Mac.
I can't understand why... they are the same images!
If it's important i can upload some files of this. Thank you very much.

Thank you for all and, please, forgive my really bad english! Bye-
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion of DCM-Files with multiple images fails

Post by magick »

Post a URL to one or two of your images and the command you use. We need to reproduce the problem before we can offer a solution / patch for it.
newmagickuser

Re: Conversion of DCM-Files with multiple images fails

Post by newmagickuser »

Hi!
Here's the link to 2 zipped dcm Images:

http://www.megaupload.com/?d=UBCVENC7

and here's the description:
- the file IM-0001-0003.dcm converts correctly under Windows XP/Vista but not under Mac OS
- the file IM_00001.dcm give the colormap index's error both under XP/Vista and Mac OS

I use the convert command in the simplest possible way:

convert IM-0001-0003.dcm converteimage.jpg

Thank u for all. Bye-
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Conversion of DCM-Files with multiple images fails

Post by magick »

The Mac problem is probably related to endian. We have patch for the other problem in ImageMagick 6.4.7-1 Beta. Will take a look at the Mac problem in the next day or two.
newmagickuser

Re: Conversion of DCM-Files with multiple images fails

Post by newmagickuser »

You're really great!!!
I'll stay tuned for news about it! Bye
newmagickuser

Re: Conversion of DCM-Files with multiple images fails

Post by newmagickuser »

Hi all!
The problem under Windows XP/Vista is solved! Thank you very much!
About MacOS the ImageMagick version is 6.4.6 yet?
When I download latest version from the project's home page I found 6.4.6 version. Is correct?
In your installation instruction in download page you refer to 6.4.7 in the following passage:

Code: Select all

Set the MAGICK_HOME environment variable to the path where you extracted the ImageMagick files. For example:

  export MAGICK_HOME="$HOME/ImageMagick-6.4.7"
but the version into the MacOS package is 6.4.6.
It's an error of mine, or 6.4.7 was not compiled for Mac?
Really thank you for all. Bye-
Post Reply