Im working on a software library that uses ImageMagick to decompress the image data from DICOM files. This works just fine for many files, but there is this file that is causing problems. When trying to convert the DICOM file to an ordinary image, I get an error:
Code: Select all
C:\samples>convert explicit_ct_jpeg-lossless-nh_mono2.dcm image.png
convert.exe: Unsupported JPEG process: SOF type 0xc3 `C:/WINDOWS/Temp/magick-36364ZcC1LmAuU3a' @ error/jpeg.c/JPEGErrorHandler/319.
convert.exe: no images defined `image.png' @ error/convert.c/ConvertImageCommand/3106.
https://github.com/dicom/ruby-dicom/raw ... _mono2.dcm
According to the file's transfer syntax (1.2.840.10008.1.2.4.70), this jpeg variant has the following description:
JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression
Would it be possible to add support for this kind of jpg compression to ImageMagick?
If so, that would be awesome!
Best regards,
Chris
Environment information:
Operating system: Windows XP SP3 32 bit
Imagemagick install file: ftp://ftp.imagemagick.org/pub/ImageMagi ... 86-dll.exe
Code: Select all
C:\samples>convert -version
Version: ImageMagick 6.8.4-10 2013-04-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jng jp2 jpeg lcms lzma pango png ps tiff x xml zlib
Code: Select all
C:\samples>convert -list configure
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
Path: C:\Programfiler\ImageMagick-6.8.4-Q16\configure.xml
Name Value
-------------------------------------------------------------------------------
CC vs10
COPYRIGHT Copyright (C) 1999-2013 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x684
LIB_VERSION_NUMBER 6,8,4,10
NAME ImageMagick
RELEASE_DATE 2013-05-01
VERSION 6.8.4
WEBSITE http://www.imagemagick.org
Code: Select all
C:\samples>convert -debug module explicit_ct_jpeg-lossless-nh_mono2.dcm image.png
2013-04-23T10:55:14+02:00 0:00.000 0.000u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1263/Module
Searching for module "DCM" using filename "IM_MOD_RL_DCM_.dll"
2013-04-23T10:55:14+02:00 0:00.015 0.000u 6.8.4 Module convert.exe[2548]: module.c/GetMagickModulePath/565/Module
Searching for coder module file "IM_MOD_RL_DCM_.dll" ...
2013-04-23T10:55:14+02:00 0:00.015 0.000u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1272/Module
Opening module at path "C:\Programfiler\ImageMagick-6.8.4-Q16\modules\coders\IM_MOD_RL_DCM_.dll"
2013-04-23T10:55:14+02:00 0:00.015 0.000u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1299/Module
Method "RegisterDCMImage" in module "DCM" at address 671C44D0
2013-04-23T10:55:14+02:00 0:00.031 0.000u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1313/Module
Method "UnregisterDCMImage" in module "DCM" at address 671C4540
2013-04-23T10:55:14+02:00 0:00.062 0.031u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1263/Module
Searching for module "JPEG" using filename "IM_MOD_RL_JPEG_.dll"
2013-04-23T10:55:14+02:00 0:00.078 0.031u 6.8.4 Module convert.exe[2548]: module.c/GetMagickModulePath/565/Module
Searching for coder module file "IM_MOD_RL_JPEG_.dll" ...
2013-04-23T10:55:14+02:00 0:00.078 0.031u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1272/Module
Opening module at path "C:\Programfiler\ImageMagick-6.8.4-Q16\modules\coders\IM_MOD_RL_JPEG_.dll"
2013-04-23T10:55:14+02:00 0:00.078 0.031u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1299/Module
Method "RegisterJPEGImage" in module "JPEG" at address 675A7090
2013-04-23T10:55:14+02:00 0:00.093 0.031u 6.8.4 Module convert.exe[2548]: module.c/OpenModule/1313/Module
Method "UnregisterJPEGImage" in module "JPEG" at address 675A4610
convert.exe: Unsupported JPEG process: SOF type 0xc3 `C:/WINDOWS/Temp/magick-2548hJpza5pGNdaR' @ error/jpeg.c/JPEGErrorH
andler/319.
convert.exe: no images defined `image.png' @ error/convert.c/ConvertImageCommand/3106.