Page 1 of 1
Can't convert some DCM files anymore
Posted: 2014-01-27T10:42:05-07:00
by schtorch
Hi,
I have updated to ImageMagick-6.8.8-2 from 6.8.7-10 and I have problems converting from some DCM images. It is working with the same file with the previous version. Maybe an openjpeg problem, because DCM supports some JPEG-2000 version and the delegate result changed from jp2 to openjp2.
Code: Select all
convert test.dcm test.jpg
convert: no decode delegate for this image format `/tmp/magick-8831hGUD43ObSqqV' @ error/constitute.c/ReadImage/555.
convert: no images defined `test.jpg' @ error/convert.c/ConvertImageCommand/3147.
Code: Select all
./configure --enable-hdri --disable-shared --without-magick-plus-plus --with-wmf --with-webp
from version that is not working:
Code: Select all
DELEGATES = bzlib mpeg fontconfig freetype jng jpeg lcms lzma openexr openjp2 pango png ps tiff webp wmf x xml zlib
from working version:
Code: Select all
DELEGATES = bzlib mpeg fontconfig freetype jng jp2 jpeg lcms lzma openexr pango png ps tiff webp wmf x xml zlib
from both versions:
Code: Select all
# convert -list format | grep DCM
DCM* r-- Digital Imaging and Communications in Medicine image
It would be great if you could give me an idea what the problem is.
Re: Can't convert some DCM files anymore
Posted: 2014-01-27T11:09:56-07:00
by magick
Post a URL so we can download your image and try to reproduce the problem. Once we can reproduce the problem, we'll post here with a solution.
Re: Can't convert some DCM files anymore
Posted: 2014-01-27T12:31:54-07:00
by schtorch
Can't post that file due to privacy (DCM files are used in the medicine a lot), but I found a file in the Internet that shows the same (technical) symptoms.
The file I checked with is called:
comp90_v3.dcm
https://drive.google.com/folderview?id= ... sp=sharing
Re: Can't convert some DCM files anymore
Posted: 2014-01-27T13:23:05-07:00
by dlemstra
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.8-4 Beta, available by sometime tomorrow. Thanks.
Re: Can't convert some DCM files anymore
Posted: 2014-01-27T13:28:00-07:00
by schtorch
This is incredible fast! Thanks a bunch!
Re: Can't convert some DCM files anymore
Posted: 2014-01-31T11:43:08-07:00
by schtorch
I just checked with the released version 6.8.8-4 and unfortunately it is still not working for me and I get the same error.
It seems to me it was an JPEG-2000 problem.
When doing a configure (same lines as in original post), I get the following output, leaving JPEG-2000 empty instead of "no" or "yes"
Code: Select all
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes
LCMS v1 --with-lcms=yes yes
LCMS v2 --with-lcms2=yes no
It seems I can't convert (some) JPEG-2000 images with the new version. Example taken from:
http://www.microimages.com/gallery/jp2/
The following is working on 6.8.7-10 but not on 6.8.8-4
Code: Select all
ImageMagick-6.8.8-4 # convert CB_TM432.jp2 test.jpg
convert: no decode delegate for this image format `CB_TM432.jp2' @ error/constitute.c/ReadImage/555.
convert: no images defined `test.jpg' @ error/convert.c/ConvertImageCommand/3147.
The following is working on the same machine:
Code: Select all
# opj_decompress -i CB_TM432.jp2 -o image.pgm
[INFO] Start to read j2k main header (85).
[INFO] Main header has been correctly decoded.
[INFO] No decoded area parameters, set the decoded area to the whole image
[INFO] Header of tile 0 / 0 has been read.
[INFO] Tile 1/1 has been decoded.
[INFO] Image data has been updated with tile 1.
[INFO] Stream reached its end !
WARNING -> [PGM file] Only the first component
is written to the file
Generated Outfile image.pgm
Would you mind to take a look again? Is it my installation and I'm missing some libs or did the fix not fix the problem?
Re: Can't convert some DCM files anymore
Posted: 2014-01-31T11:51:19-07:00
by fmw42
JPEG-2000 --with-jp2=yes
That was for jasper, I believe. Look and see if you have an entry for OpenJpeg or OpenJP2.
Re: Can't convert some DCM files anymore
Posted: 2014-01-31T12:05:24-07:00
by schtorch
Ah, yes, I have it, but it does not work...
Code: Select all
OpenEXR --with-openexr=yes yes
OpenJP2 --with-openjp2=yes yes
PANGO --with-pango=yes yes
PERL --with-perl=no no
Code: Select all
CXX = g++
CXXFLAGS = -g -O2 -pthread
FEATURES = DPC OpenMP
DELEGATES = bzlib mpeg fontconfig freetype jng jpeg lcms lzma openexr openjp2 pango png ps tiff webp x xml zlib
But the following lines do not give any result:
Code: Select all
ImageMagick-6.8.8-4 # convert -list format | grep jp2
ImageMagick-6.8.8-4 # convert -list delegate | grep openjp2
Re: Can't convert some DCM files anymore
Posted: 2014-01-31T12:07:20-07:00
by magick
Try
- convert -list format | grep JP2
J2K* JP2 rw- JPEG-2000 Code Stream Syntax (2.0.0)
JP2* JP2 rw- JPEG-2000 File Format Syntax (2.0.0)
JPC* JP2 rw- JPEG-2000 Code Stream Syntax (2.0.0)
JPT* JP2 rw- JPEG-2000 File Format Syntax (2.0.0)
Re: Can't convert some DCM files anymore
Posted: 2014-01-31T12:09:12-07:00
by schtorch
This is empty as well. Should be somewhere here I guess:
Code: Select all
JNG* rw- JPEG Network Graphics
See http://www.libpng.org/pub/mng/ for details about the JNG
format.
JNX* r-- Garmin tile format
JPEG* rw- Joint Photographic Experts Group JFIF format (62)
JPG* rw- Joint Photographic Experts Group JFIF format (62)
JSON -w+ The image format and characteristics