Skip to main content

Could not decompress the dicom image

4 replies [Last post]
Joined: 2008-10-15


This is my thread on this forum.

I have installed
on my system.
I am using java 1.6 update 6

Everything is ok while installation.
Even i am added classpath for

I am opening a compressed dicom file, which compressed via JPEG 2000

I am reading this file using loci tools.
So while reading file it is giving me error

loci.formats.FormatException: Could not decompress JPEG2000 image. Please make sure that jai_imageio.jar is installed.

Here it is prompting that i have not installed jai_imageio.jar.
What i will do?
Please help me.

for loci tools see link

please help me.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-07-10

Difficult to say for us not knowing loci. But according to the website
you should install jai_imageio 1.1 and it's mentioned how to do this.
It seems you are going a different way.

Maybe loci is using a different Java VM, not Java 6. The website says
you should first start ImageJ and give it a try. If you have installed
jai_imageio to Java 1.4 or Java 5, your VM 6 has no jai_imageio.
You may first start java from command line with -version to know if you
are really using java 6. Then you have to check if the CLASSPATH
is really pointing to jai_imageio.jar. Maybe you should add some printouts
to the loci start scripts to print out CLASSPATH. If you are not using
JRE of ImageJ but installed jai_imageio.jar there you will not succeed.

Maybe the classpath seperators you are using are not correct. You
could give us your script and some output at command line to give
you more hints.

Joined: 2008-10-15


I installed only java 1.6 update 6 on my WinXP pack 2 system.
Then i installed jai_1_1_3 for both the jre and jdk.

Is there any other way to check jai_imageio is installed properly or not.

Joined: 2006-07-10

Maybe there is another JVM installed that you are not aware of.
You can check if jai_imageio.jar is in jre/lib/ext directory.

Another way is to write a little test program to get the J2k reader
e.g. by mime-type. If you get a J2KImageReader not an empty
Collection you have sucessfully installed jai_imageio.

However it is necessary that loci uses your Java 1.6 not the mentioned
ImageJ VM. Maybe there is a loci start script and you can invest
some time there to find out which JVM is used and if the classpath
is correct.

Joined: 2008-10-15


No there is no any other JVM.
i write a program and it run successfully.

anyway thanks.
till here not any problem from JAI side.
Let see the Loci's side.

I don't know why they are giving jai_imageio not install.

just see the link below.
Here loci gives the code for opening JPEG2000 images.
And Just search for the
"Could not decompress JPEG2000 image." word on source code.

I am getting the same error while opening the image.


Message was edited by: prashant144

Message was edited by: prashant144