Converting DCM to JPG

708 views
Skip to first unread message

Levy Moreira

unread,
Apr 16, 2014, 8:48:31 AM4/16/14
to dcm...@googlegroups.com
I am try convert dcm to jpg and this code work:

http://pastebin.com/AdW17U7i

But it only work with dcm file copy by dcm4chee server. If other server get the dcm it dont convert and i get the error below.


The file CF633267.dcm is one dcm4chee file, and the CF633267DICOMTIX.dcm is a file copy by other program. 
If i use the weasis to open, the two files open, but the code to convert work only in the CF633267.dcm file. 

If someone know somithing solution i will be very great for help.


 Erro: javax.imageio.IIOException: codecLib error
javax.imageio.IIOException: codecLib error
at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReader.getInfoImage(CLibJPEGImageReader.java:207)
at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReader.getImageTypes(CLibJPEGImageReader.java:274)
at javax.imageio.ImageReader.getRawImageType(ImageReader.java:682)
at com.sun.media.imageioimpl.plugins.clib.CLibImageReader.read(CLibImageReader.java:571)
at org.dcm4che.imageio.plugins.dcm.DicomImageReader.read(DicomImageReader.java:281)
at br.org.isgh.dcm.Dcm2Jpg.readImage(Dcm2Jpg.java:137)
at br.org.isgh.dcm.Dcm2Jpg.convert(Dcm2Jpg.java:108)
at br.org.isgh.dcm.Dcm2Jpg.mconvert(Dcm2Jpg.java:83)
at br.org.isgh.dcm.Dcm2Jpg.main(Dcm2Jpg.java:68)
Caused by: java.lang.UnsatisfiedLinkError: com.sun.medialib.codec.jpeg.Decoder.njpeg_decode_init(Ljava/lang/Object;)J
at com.sun.medialib.codec.jpeg.Decoder.njpeg_decode_init(Native Method)
at com.sun.medialib.codec.jpeg.Decoder.<init>(Decoder.java:58)
at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReader.getInfoImage(CLibJPEGImageReader.java:199)
... 8 more



Levy Moreira

unread,
Apr 20, 2014, 9:16:24 PM4/20/14
to dcm...@googlegroups.com
The problem was my java_home variable, apparently imageio only work with java 32 bits. 
Reply all
Reply to author
Forward
0 new messages