Login  Register

Re: Error on Jpeg2000 decompress

Posted by Oky on May 19, 2010; 12:34am
URL: http://imagej.273.s1.nabble.com/Error-on-Jpeg2000-decompress-tp3688268p3688270.html

My computer has 16 GB memory. Right now, 4096 MB is allocated to
ImageJ. I will increase the size of memory allocation for ImageJ and
try to open the jpeg2000 format file.

Thanks for your suggestion!

Best regards,
Ohkyung

On Tue, May 18, 2010 at 3:19 PM, Curtis Rueden <[hidden email]> wrote:

> Hi Ohkyung,
>
> From the stack trace, it looks like you ran out of memory.
>
> This can be a problem with JPEG2000 compressed files, because the
> compression rate can be very high, meaning the uncompressed data takes much
> more space than the file on disk. In your case, 173MB could become ten times
> that (hard to say for sure without seeing your data).
>
> How much RAM do you have allocated to your ImageJ? See Edit > Options >
> Memory & Threads in the menu... you may need to set Maximum Memory higher.
> Click that dialog's "Help" button for more details.
>
> -Curtis
>
> On Tue, May 18, 2010 at 3:46 PM, Ohkyung <[hidden email]> wrote:
>
>> Dear ImagJ users,
>>
>> I having problem to open jpeg2000 format file created from Neurolucida.
>> I am using ImageJ 1.43t with Java 1.6.0_12 (64-bit) on Windows Vista
>> Ultimate x64 machine. The jpeg2000 file size is 177318 KB.
>>
>> When I tried to open one of my jpeg2000 file utilizing LOCI Bio-format
>> plugin (Release: stabe 4.1, revision 5727, built 3 December 2009), I
>> got the following error message.
>>
>>
>> loci.formats.FormatException: Could not decompress JPEG2000 image.
>> Please make sure that jai_imageio.jar is installed.
>>        at
>> loci.formats.codec.JPEG2000Codec.decompress(JPEG2000Codec.java:339)
>>        at
>> loci.formats.in.NativeND2Reader.openBytes(NativeND2Reader.java:141)
>>        at loci.formats.DelegateReader.openBytes(DelegateReader.java:144)
>>        at loci.formats.FormatReader.openBytes(FormatReader.java:599)
>>        at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:261)
>>        at
>> loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:230)
>>        at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:261)
>>        at
>> loci.plugins.util.ImagePlusReader.openProcessors(ImagePlusReader.java:167)
>>        at loci.plugins.importer.Importer.run(Importer.java:663)
>>        at loci.plugins.LociImporter.run(LociImporter.java:77)
>>        at ij.IJ.runUserPlugIn(IJ.java:184)
>>        at ij.IJ.runPlugIn(IJ.java:151)
>>        at ij.IJ.runPlugIn(IJ.java:140)
>>        at
>> loci.plugins.shortcut.ShortcutPanel.runPlugIn(ShortcutPanel.java:186)
>>        at
>> loci.plugins.shortcut.ShortcutPanel.actionPerformed(ShortcutPanel.java:201)
>>        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>>        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
>> Source)
>>        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
>> Source)
>>        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>>        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
>> Source)
>>        at java.awt.Component.processMouseEvent(Unknown Source)
>>        at javax.swing.JComponent.processMouseEvent(Unknown Source)
>>        at java.awt.Component.processEvent(Unknown Source)
>>        at java.awt.Container.processEvent(Unknown Source)
>>        at java.awt.Component.dispatchEventImpl(Unknown Source)
>>        at java.awt.Container.dispatchEventImpl(Unknown Source)
>>        at java.awt.Component.dispatchEvent(Unknown Source)
>>        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>>        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>>        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>>        at java.awt.Container.dispatchEventImpl(Unknown Source)
>>        at java.awt.Window.dispatchEventImpl(Unknown Source)
>>        at java.awt.Component.dispatchEvent(Unknown Source)
>>        at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
>> Source)
>>        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>>        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
>> Source)
>>        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>        at java.awt.EventDispatchThread.run(Unknown Source)
>> Caused by: loci.common.ReflectException: Cannot execute method: read
>>        at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:304)
>>        at
>> loci.formats.codec.JPEG2000Codec.decompress(JPEG2000Codec.java:323)
>>        ... 39 more
>> Caused by: java.lang.reflect.InvocationTargetException
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>        at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:299)
>>        ... 40 more
>> Caused by: java.lang.OutOfMemoryError: Java heap space
>>        at jj2000.j2k.image.DataBlkInt.<init>(DataBlkInt.java:97)
>>        at
>> jj2000.j2k.wavelet.synthesis.InvWTFull.getInternCompData(InvWTFull.java:277)
>>        at
>> jj2000.j2k.image.ImgDataConverter.getData(ImgDataConverter.java:249)
>>        at
>> jj2000.j2k.image.ImgDataConverter.getInternCompData(ImgDataConverter.java:205)
>>        at
>> jj2000.j2k.image.invcomptransf.InvCompTransf.invRCT(InvCompTransf.java:430)
>>        at
>> jj2000.j2k.image.invcomptransf.InvCompTransf.getInternCompData(InvCompTransf.java:362)
>>        at
>> com.sun.media.imageioimpl.plugins.jpeg2000.J2KReadState.readSubsampledRaster(J2KReadState.java:829)
>>        at
>> com.sun.media.imageioimpl.plugins.jpeg2000.J2KReadState.readBufferedImage(J2KReadState.java:384)
>>        at
>> com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.read(J2KImageReader.java:454)
>>        at javax.imageio.ImageReader.read(Unknown Source)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>        at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:299)
>>        at
>> loci.formats.codec.JPEG2000Codec.decompress(JPEG2000Codec.java:323)
>>        at
>> loci.formats.in.NativeND2Reader.openBytes(NativeND2Reader.java:141)
>>        at loci.formats.DelegateReader.openBytes(DelegateReader.java:144)
>>        at loci.formats.FormatReader.openBytes(FormatReader.java:599)
>>        at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:261)
>>        at
>> loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:230)
>>        at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:261)
>>        at
>> loci.plugins.util.ImagePlusReader.openProcessors(ImagePlusReader.java:167)
>>        at loci.plugins.importer.Importer.run(Importer.java:663)
>>        at loci.plugins.LociImporter.run(LociImporter.java:77)
>>        at ij.IJ.runUserPlugIn(IJ.java:184)
>>        at ij.IJ.runPlugIn(IJ.java:151)
>>        at ij.IJ.runPlugIn(IJ.java:140)
>>        at
>> loci.plugins.shortcut.ShortcutPanel.runPlugIn(ShortcutPanel.java:186)
>>        at
>> loci.plugins.shortcut.ShortcutPanel.actionPerformed(ShortcutPanel.java:201)
>>        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>>        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
>> Source)
>>
>>
>> Thanks very much for your help in advance.
>>
>> Best regards,
>> Ohkyung Kwon
>>
>



--
Ohkyung Kwon

http://www.linkedin.com/in/ohkyung
http://www.wpskorea.org
http://ncmir.ucsd.edu