Skip to main content

[JAI-IMAGEIO] Unable to decode JPEG with coding process 12

3 replies [Last post]
Anonymous

Hi.

I am using the JAI Image-I/O native JPEG reader (CLibJPEGImageReader) in
order to decode a JPEG-encoded image extracted from a DICOM 3.0 medical
image file. The DICOM file is encoded with Transfer Syntax
"1.2.840.10008.1.2.4.55", which corresponds to a JPEG encoding of the image
data, in particular to a JPEG coding process 12 (12-bit), full progression,
non-hierarchical.

The CLibJPEGImageReader fails to decode the JPEG image extracted from the
DICOM file, throwing the following exception:

===============================

Error: One factory fails for the operation "ImageRead"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at
javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperatio
nRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:818)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:866)
at javax.media.jai.RenderedOp.getData(RenderedOp.java:2264)
[...]

===============================

Does the native JAI Image I/O JPEG reader plug-in supports image files
encoded with JPEG coding process 12 (12-bit), full progression,
non-hierarchical?
If necessary or useful, I could easily create a self-contained code sample
with an attached file which demonstrates the problem.

Any help or suggestion will be highly appreciated.

Best regards,

Marco.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
James Cheng

Hi Marco,

> Does the native JAI Image I/O JPEG reader plug-in supports image files
> encoded with JPEG coding process 12 (12-bit), full progression,
> non-hierarchical?

Probably not. From the source code, it seems to me that the clib JPEG
decoder supports one kind of progression: 8-bit, DCT-based, with an SOF2
marker.

> If necessary or useful, I could easily create a self-contained code sample
> with an attached file which demonstrates the problem.

To help us tracking and fixing it, please file an issue (ENHANCEMENT) at

https://jai-imageio-core.dev.java.net/servlets/ProjectIssues

A self-contained test case is highly appreciated, as always.

BTW, the stack trace you posted earlier didn't show anything related to
the native JPEG decoder, which is kind of odd.

Thanks,
-James

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Marco Sambin - NeoLogica

Hi James,

I've just filed an issue (ENHANCEMENT) on the Image I/O project web page. By
the way, the complete stack trace also includes lines related to the native
JPEG decoder: I've omitted several lines in my previous post. In any case,
the code sample that I submitted can show the entire exception; it can also
be downloaded from:

http://demo.neologica.it/JpegReaderTester.zip

I would like to underline that such "unusual" JPEG formats are actually
quite usual in the medical imaging field, especially inside DICOM files. So
the support for them is very important for people using JAI and the JAI
Image I/O Tools in such an environment.

Thanks a lot for all your efforts.

Regards,

Marco.

-----Original Message-----
From: James.Cheng@Sun.COM [mailto:James.Cheng@Sun.COM]
Sent: giovedì 3 agosto 2006 19.56
To: interest@jai-imageio.dev.java.net
Subject: Re: [JAI-IMAGEIO] Unable to decode JPEG with coding process 12

Hi Marco,

> Does the native JAI Image I/O JPEG reader plug-in supports image files
> encoded with JPEG coding process 12 (12-bit), full progression,
> non-hierarchical?

Probably not. From the source code, it seems to me that the clib JPEG
decoder supports one kind of progression: 8-bit, DCT-based, with an SOF2
marker.

> If necessary or useful, I could easily create a self-contained code
> sample with an attached file which demonstrates the problem.

To help us tracking and fixing it, please file an issue (ENHANCEMENT) at

https://jai-imageio-core.dev.java.net/servlets/ProjectIssues

A self-contained test case is highly appreciated, as always.

BTW, the stack trace you posted earlier didn't show anything related to the
native JPEG decoder, which is kind of odd.

Thanks,
-James

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

James Cheng

Hi Marco,

> I've just filed an issue (ENHANCEMENT) on the Image I/O project web page. By
> the way, the complete stack trace also includes lines related to the native
> JPEG decoder: I've omitted several lines in my previous post. In any case,
> the code sample that I submitted can show the entire exception; it can also
> be downloaded from:
>
> http://demo.neologica.it/JpegReaderTester.zip

Thanks for filing the issue and the good test case.

> I would like to underline that such "unusual" JPEG formats are actually
> quite usual in the medical imaging field, especially inside DICOM files. So
> the support for them is very important for people using JAI and the JAI
> Image I/O Tools in such an environment.

We'll definitely take this into consideration. Given that 1.1-beta has
been out for a while, we probably can not make this enhancement into
the 1.1-fcs release.

Thanks,
-James

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net