Native jpeg codecs from weasis in dcm4che

323 views
Skip to first unread message

grai...@gmail.com

unread,
Dec 11, 2017, 7:30:59 AM12/11/17
to dcm4che
If you need to support all jpeg compression types like Jpeg Lossless and Jpeg LS then there are only native codecs in dcm4che (JAI ImageIO - CLibJPEGImageReader) . But the native libraries are not available for 64bit windows runtime.

I saw that there are new codecs in weasis. They are also native and based on openjpeg / jpeg library. But they are available on 64bit windows too. They support JpegLS / Jpeg Losses and 2K.

I tried them in dcm4che2, but was not successfull. I added the jar files and put the native libraries into the java runtimes bin directory. I changed the configuration to use the new reader:

ImageReaderFactory.properties
1.2.840.10008.1.2.4.80=jpeg-ls,org.weasis.jpeg.NativeJLSImageReader,0

The native libraries were found, but then there is a NullPointerException somewere in RandomAccessFile. I will continue to figure out what the problem ist...


Is it possible to use these new codecs in dcm4che? Will there be an official release containing the new codecs? Does the license allow you to use the codec in dcm4che (Eclipse Public Licence)?



gunterze

unread,
Dec 11, 2017, 8:03:40 AM12/11/17
to dcm4che
Sorry, I have not yet found time to take a look on Nicolas's Image IO wrapper of CharLS and OpenJPEG provided as pull request https://github.com/dcm4che/dcm4che/pull/28 - it's on my queue, but I cannot promise a date.

gunter

grai...@gmail.com

unread,
Dec 11, 2017, 10:09:49 AM12/11/17
to dcm4che
Sounds good, hopefully that will work.

Nicolas Roduit

unread,
Dec 12, 2017, 12:19:56 PM12/12/17
to dcm4che
I will try to provide a new pull request because there are a lot of changes since the one mentioned above. Now all the decoders (JPEG Lossless, JPEG-LS and J2K) are embedded in the OpenCV Java wrapping. In this way all the image decoding and processing (zoom, rotation, LUT...) are on the native side (there is a big gain of performance).

grai...@gmail.com

unread,
Dec 13, 2017, 2:52:22 AM12/13/17
to dcm4che
Thank you very much, many dcm4che users will benefit from it.

Lutrero

unread,
Mar 8, 2018, 5:25:18 AM3/8/18
to dcm4che
Hello, first of all thank you very much for the codecs.

One question Nicolas. I am testing the openjpeg wrapper for compressing from LEE to JPEG2000 it does not throw errors. But when I try to decode them (with openjpeg or imageio) I face some exceptions. Did you tried the compression with openjpeg?

Luis

Nicolas Roduit

unread,
Mar 11, 2018, 1:47:15 AM3/11/18
to dcm4che
The Pull Request mentioned above is out of date. The new implementation is https://github.com/nroduit/dcm4che/commits/opencv-codecs

The compression with openjpeg has not been implemented yet.

Lutrero

unread,
Mar 11, 2018, 7:18:58 AM3/11/18
to dcm4che
Thank you very much. I will try them later.

Nicolas Roduit

unread,
Mar 18, 2018, 12:40:05 PM3/18/18
to dcm4che
It has been merged in dcm4che: https://github.com/dcm4che/dcm4che/pull/247

Dr Suresh Viswanathan

unread,
Mar 20, 2018, 10:17:04 AM3/20/18
to dcm...@googlegroups.com
Great work Nicolas. Looking forward to testing it out. 

Suresh. 
--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

grai...@gmail.com

unread,
Apr 11, 2018, 10:01:46 AM4/11/18
to dcm4che
Thank you very much!!! 
Reply all
Reply to author
Forward
0 new messages