[Magick-bugs] Reading too much DCM files with Magick++ expected the error "Too many files opened", No problem with PNG files

Arnaud BARRÉ arnaud.barre at gmail.com
Fri Jun 5 14:05:07 PDT 2009


Because I can't use the ImageMagick convert command with my dicom file
(memory allocation error), I create a little program using ITK and
Magick++ to read my dicom file, extract each image,  and write them in
PGM file.

I use a file buffer between ITK and Magick++ to write PGM files.
However, if the file buffer is a DCM file, after 252 extracted images
I have the error "Too many files opened". If the file buffer is a PGN
file, there is no error in the program. I check the dcm.c and
especialy the ReadDCMImage function. I didn' find any CloseBlob
function. Is it normal?

I joined a ZIP file containing the program sources. It requires CMake,
ITK and ImageMagick. To use it, type: DCM2IMG input.dcm ouput%03i.pgm.
You need a big DCM file (more than 252 images with my system) to
repeat this bug with my program.


More information about the Magick-bugs mailing list