List Info

Thread: convert .dcm to .jpg




convert .dcm to .jpg
user name
2006-12-11 20:02:51
>  I've found testimonies of successful dcm->jpg

Those DCM images were most likely not losslessly compressed
JPEG or
they have a version of ImageMagick that supports lossless
compression.
The lossless compression patch I mention is against the JPEG
delegate
library, not ImageMagick.  You can find it here:

 
ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ljpeg-6b
.tar.gz
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
convert .dcm to .jpg
user name
2006-12-20 02:46:12
--- omicronpersei8imagemagick.org wrote:

> >  I've found testimonies of successful dcm->jpg
> 
> Those DCM images were most likely not losslessly
> compressed JPEG or
> they have a version of ImageMagick that supports
> lossless compression.
> The lossless compression patch I mention is against
> the JPEG delegate
> library, not ImageMagick.  You can find it here:
> 
>  
>
ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ljpeg-6b
.tar.gz
> 


I'm clearly running out of kung foo trying to patch
this delegate.  I've downloaded libjpeg-6b.zip which I
can configure, make, and install without any problem. 
When I copy ljpeg-6b.patch into the libjpeg-6b
directory and run

tjn$ patch < ljpeg-6b.patch

the patch seemingly successfully updates about 60
files.
The make fails.  I've captured stdout (I can make it
available if it's helpful) and this is what shows up
on stderr.

tjn$ make > ../patched.make      
jcinit.c: In function 'jinit_compress_master':
jcinit.c:36: warning: implicit declaration of function
'jinit_c_codec'
jdinput.c: In function 'consume_markers':
jdinput.c:267: warning: implicit declaration of
function 'jinit_d_codec'
jdtrans.c: In function 'transdecode_master_selection':
jdtrans.c:112: warning: implicit declaration of
function 'jinit_d_codec'
ld: Undefined symbols:
_jinit_c_codec
_jinit_shuff_encoder
_jinit_d_codec
/usr/bin/libtool: internal link edit command failed
make[1]: *** [libjpeg.la] Error 1
make: *** [all] Error 2


I appreciate any insight from those who have been able
to successfully apply this patch libjpeg-6b or any
thoughts from those stronger at compilation than I.

Much Thanks,
-Travis


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
convert .dcm to .jpg
user name
2006-12-21 17:53:08
I've finally gotten the libjpeg-6b to compile once
patched by ljpeg-6b.  After that I created a fresh
IM6.3.1 which passes the basic test, and a great deal
of the make check tests.  It fails on tiff,
ghostscript, png, jp2, jbig, fpx, and ept modules.

I'm suffering:

tjn$ convert view0001.dcm view0001.jpg
convert: Unsupported JPEG process: SOF type 0xc3
`/var/tmp/magick-lrPBkNLV'.
convert: missing an image filename `view0001.jpg'.

My first two guesses are
1. My new jpeg binaries aren't being used as the
necessary delegate.  I don't know how to tell
ImageMagic to use them.

or 

2. I am invoking the command incorrectly.

when I -verbose it I get 318 lines of output.  This is
the most image related info I tracked down.

0x1092    1 US-US (0x0028,0x0002) Samples per Pixel: 1
0x109C   12 CS-CS (0x0028,0x0004) Photometric
Interpretation: MONOCHROME2 
0x10B0    1 US-US (0x0028,0x0010) Rows: 256
0x10BA    1 US-US (0x0028,0x0011) Columns: 256
0x10C4   14 DS-DS (0x0028,0x0030) Pixel Spacing:
0.9375.9375 
0x10DA    1 US-US (0x0028,0x0100) Bits Allocated: 16
0x10E4    1 US-US (0x0028,0x0101) Bits Stored: 16
0x10EE    1 US-US (0x0028,0x0102) High Bit: 15
0x10F8    1 US-US (0x0028,0x0103) Pixel
Representation: 1
0x1102    1 SS-SS (0x0028,0x0106) Smallest Image Pixel
Value: 0
0x110C    1 SS-SS (0x0028,0x0107) Largest Image Pixel
Value: 516
0x1116    1 SS-SS (0x0028,0x0120) Pixel Padding Value:
0
0x1120    4 DS-DS (0x0028,0x1050) Window Center: 258 
0x112C    4 DS-DS (0x0028,0x1051) Window Width: 516 
0x1138    2 CS-CS (0x0028,0x2110) Lossy Image
Compression: 00

Much thanks for looking.

-Travis

--- omicronpersei8imagemagick.org wrote:

> >  I've found testimonies of successful dcm->jpg
> 
> Those DCM images were most likely not losslessly
> compressed JPEG or
> they have a version of ImageMagick that supports
> lossless compression.
> The lossless compression patch I mention is against
> the JPEG delegate
> library, not ImageMagick.  You can find it here:
> 
>  
>
ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ljpeg-6b
.tar.gz
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
convert .dcm to .jpg
user name
2006-12-27 10:49:07
If you are working on a Windows machine, you could try the
freeware 
IrfanView instead: It has a DICOM filter and offers batch
processing of 
images.

I have also encountered IM's problems with some JPEG
compression types 
when decoding multipage TIFFs and found that IrfanView could
do that job 
without problems.

One question concernig the DLL patch: I would have supposed
that it 
suffices to exchange the JPEG-DLL
"IM_MOD_RL_jpeg_.dll" against it's 
updated counterpart, as it is a *dynamic* link library. Why
do you have 
to recompile something like that.

Wolfgang Hugemann
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
convert .dcm to .jpg
user name
2006-12-28 16:23:55
I've been trying to get IM functional for my purpose
on OS X 10.4.8 but thanks for the lead on the windows
software.  I haven't given up yet and am learning so
much!

I've gotten ImageMagick to use the updated jpeg
libraries and it now will convert the testimgl.jpg
that comes bundled in the libjpeg-6b patch.  I'm
working on documenting the process of getting
everything working together in my environment.

Now, when I run the conversion on my .dcm files I am
alerted to:

tjn$ convert view0001.dcm view0001.jpg
convert: 12-bit JPEG not supported.  Reducing pixel
data to 8 bits `[[temp file path]]`.
convert: Must downscale data from 16 bits to 8 `[[temp
file path]]`.
tjn$

Finally a different result!
The output files are corrupted somehow and I am unable
to view the result.

I must be missing something when I invoke the
convert call.  Any thoughts?

Much Thanks!

-Travis


--- Hugemann <AutoHugemann.de> wrote:

> If you are working on a Windows machine, you could
> try the freeware 
> IrfanView instead: It has a DICOM filter and offers
> batch processing of 
> images.
> 
> I have also encountered IM's problems with some JPEG
> compression types 
> when decoding multipage TIFFs and found that
> IrfanView could do that job 
> without problems.
> 
> One question concernig the DLL patch: I would have
> supposed that it 
> suffices to exchange the JPEG-DLL
> "IM_MOD_RL_jpeg_.dll" against it's 
> updated counterpart, as it is a *dynamic* link
> library. Why do you have 
> to recompile something like that.
> 
> Wolfgang Hugemann
> _______________________________________________
> Magick-users mailing list
> Magick-usersimagemagick.org
>
http://studio.imagemagick.org/mailman/listinfo/magick
-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )