TraKEM export error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TraKEM export error

Ashwin
Hi all,

I am running into some errors when I try to export images from TrakEM2, not sure what the reason could be. Has anyone encountered this before?

==================
ERROR:
java.lang.NegativeArraySizeException
        at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:42)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:253)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:194)
        at java.awt.image.BufferedImage.<init>(BufferedImage.java:549)
        at ini.trakem2.persistence.Loader.getFlatAWTImage(Loader.java:2790)
        at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2702)
        at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2699)
        at ini.trakem2.persistence.Loader$6.run(Loader.java:2636)
        at java.lang.Thread.run(Thread.java:662)
==================

==================
ERROR:
java.lang.NullPointerException
        at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2708)
        at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2699)
        at ini.trakem2.persistence.Loader$6.run(Loader.java:2636)
        at java.lang.Thread.run(Thread.java:662)
==================


Thanks,
Ashwin
Reply | Threaded
Open this post in threaded view
|

Re: TraKEM export error

ctrueden
Hi Ashwin,

> java.lang.NegativeArraySizeException

This exception may indicate that the resultant image plane would be more
than 2 gigapixels in size (i.e., too big to export). Otherwise it could be
a bug...

Regards,
Curtis


On Wed, Jul 31, 2013 at 9:15 AM, Ashwin <[hidden email]> wrote:

> Hi all,
>
> I am running into some errors when I try to export images from TrakEM2, not
> sure what the reason could be. Has anyone encountered this before?
>
> ==================
> ERROR:
> java.lang.NegativeArraySizeException
>         at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:42)
>         at java.awt.image.Raster.createInterleavedRaster(Raster.java:253)
>         at java.awt.image.Raster.createInterleavedRaster(Raster.java:194)
>         at java.awt.image.BufferedImage.<init>(BufferedImage.java:549)
>         at ini.trakem2.persistence.Loader.getFlatAWTImage(Loader.java:2790)
>         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2702)
>         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2699)
>         at ini.trakem2.persistence.Loader$6.run(Loader.java:2636)
>         at java.lang.Thread.run(Thread.java:662)
> ==================
>
> ==================
> ERROR:
> java.lang.NullPointerException
>         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2708)
>         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2699)
>         at ini.trakem2.persistence.Loader$6.run(Loader.java:2636)
>         at java.lang.Thread.run(Thread.java:662)
> ==================
>
>
> Thanks,
> Ashwin
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/TraKEM-export-error-tp5004234.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: TraKEM export error

Albert Cardona-2
2013/7/31 Curtis Rueden <[hidden email]>

> Hi Ashwin,
>
> > java.lang.NegativeArraySizeException
>
> This exception may indicate that the resultant image plane would be more
> than 2 gigapixels in size (i.e., too big to export). Otherwise it could be
> a bug...
>
> Regards,
> Curtis
>


Indeed, TrakEM2 does not have a check for when you are trying to export
images too large for a signed integer. Java 8 is meant to have signed long
for array indices which will solve this problem.

For now, export piece wise with a script, using the
Projects.getProject().get(0).getLoader().getFlatImage ... methods (which
use the mipmaps), or the static Patch.makeFlatImage to use the original
images in 8-bit, 16-bit 32-bit, etc.

Albert



>
>
> On Wed, Jul 31, 2013 at 9:15 AM, Ashwin <[hidden email]> wrote:
>
> > Hi all,
> >
> > I am running into some errors when I try to export images from TrakEM2,
> not
> > sure what the reason could be. Has anyone encountered this before?
> >
> > ==================
> > ERROR:
> > java.lang.NegativeArraySizeException
> >         at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:42)
> >         at java.awt.image.Raster.createInterleavedRaster(Raster.java:253)
> >         at java.awt.image.Raster.createInterleavedRaster(Raster.java:194)
> >         at java.awt.image.BufferedImage.<init>(BufferedImage.java:549)
> >         at
> ini.trakem2.persistence.Loader.getFlatAWTImage(Loader.java:2790)
> >         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2702)
> >         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2699)
> >         at ini.trakem2.persistence.Loader$6.run(Loader.java:2636)
> >         at java.lang.Thread.run(Thread.java:662)
> > ==================
> >
> > ==================
> > ERROR:
> > java.lang.NullPointerException
> >         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2708)
> >         at ini.trakem2.persistence.Loader.getFlatImage(Loader.java:2699)
> >         at ini.trakem2.persistence.Loader$6.run(Loader.java:2636)
> >         at java.lang.Thread.run(Thread.java:662)
> > ==================
> >
> >
> > Thanks,
> > Ashwin
> >
> >
> >
> > --
> > View this message in context:
> > http://imagej.1557.x6.nabble.com/TraKEM-export-error-tp5004234.html
> > Sent from the ImageJ mailing list archive at Nabble.com.
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
http://albert.rierol.net
http://www.ini.uzh.ch/~acardona/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html