Montage export error in TrakEM2-FIJI: Dimensions too large

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

Montage export error in TrakEM2-FIJI: Dimensions too large

Wei
Hello,

I'm trying to export a series of large images with the Continuous release of FIJI (ImageJ 1.47n) for Linux (64-bit). I'm working on a machine with 192 GB RAM running Ubuntu 12.04.

Just trying to export a single plane (80x80 array of 2048x2048 pixel tiles) using Export > Make flat image, I get the error below.

Is there any way I can adjust the maximum dimensions?  Or perhaps other approaches?

Thanks in advance for the assistance,
Wei-

==================
ERROR:
java.lang.IllegalArgumentException: Dimensions (width=163840 height=163840) are too large
        at java.awt.image.SampleModel.<init>(SampleModel.java:112)
        at java.awt.image.ComponentSampleModel.<init>(ComponentSampleModel.java:128)
        at java.awt.image.PixelInterleavedSampleModel.<init>(PixelInterleavedSampleModel.java:69)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:638)
        at java.awt.image.Raster.createInterleavedRaster(Raster.java:265)
        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.getFlatImage(Loader.java:2677)
        at ini.trakem2.persistence.Loader$7.run(Loader.java:3141)
        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.getFlatImage(Loader.java:2677)
        at ini.trakem2.persistence.Loader$7.run(Loader.java:3141)
        at java.lang.Thread.run(Thread.java:662)
==================
Reply | Threaded
Open this post in threaded view
|

Re: Montage export error in TrakEM2-FIJI: Dimensions too large

dscho
Hi Wei-,

On Fri, 26 Apr 2013, Wei wrote:

> I'm trying to export a series of large images with the Continuous
> release of FIJI (ImageJ 1.47n) for Linux (64-bit). I'm working on a
> machine with 192 GB RAM running Ubuntu 12.04.
>
> Just trying to export a single plane (80x80 array of 2048x2048 pixel
> tiles) using Export > Make flat image, I get the error below.
>
> Is there any way I can adjust the maximum dimensions?  Or perhaps other
> approaches?
>
> Thanks in advance for the assistance,
> Wei-
>
> ==================
> ERROR:
> java.lang.IllegalArgumentException: Dimensions (width=163840 height=163840)
> are too large

The reason for this is that 163,840*163,840 = 26,843,545,600 which is
about 12 times as much as Java can fit into an array (2,147,483,648
elements).

As ImageJ and TrakEM2 are based on AWT which uses such arrays, there is
not much that can be done easily, unfortunately.

The proper way to go would be to use ImgLib2, a library designed
explicitly for large data. By abstracting the details away (unlike AWT),
you can have almost arbitrarily-large images and the algorithms
implemented using ImgLib2's data structures won't care how the data are
stored, exactly.

The problem with that is that it would be a major undertaking to port
TrakEM2 to use ImgLib2...

Ciao,
Johannes

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

Re: Montage export error in TrakEM2-FIJI: Dimensions too large

Albert Cardona-2
In reply to this post by Wei
Wei,

you'll have to do the export for CATMAID with a script. Will find it on Monday.

Albert

On Apr 26, 2013, at 6:37 PM, Wei <[hidden email]> wrote:

> Hello,
>
> I'm trying to export a series of large images with the Continuous release of
> FIJI (ImageJ 1.47n) for Linux (64-bit). I'm working on a machine with 192 GB
> RAM running Ubuntu 12.04.
>
> Just trying to export a single plane (80x80 array of 2048x2048 pixel tiles)
> using Export > Make flat image, I get the error below.
>
> Is there any way I can adjust the maximum dimensions?  Or perhaps other
> approaches?
>
> Thanks in advance for the assistance,
> Wei-
>
> ==================
> ERROR:
> java.lang.IllegalArgumentException: Dimensions (width=163840 height=163840)
> are too large
>    at java.awt.image.SampleModel.<init>(SampleModel.java:112)
>    at
> java.awt.image.ComponentSampleModel.<init>(ComponentSampleModel.java:128)
>    at
> java.awt.image.PixelInterleavedSampleModel.<init>(PixelInterleavedSampleModel.java:69)
>    at java.awt.image.Raster.createInterleavedRaster(Raster.java:638)
>    at java.awt.image.Raster.createInterleavedRaster(Raster.java:265)
>    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.getFlatImage(Loader.java:2677)
>    at ini.trakem2.persistence.Loader$7.run(Loader.java:3141)
>    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.getFlatImage(Loader.java:2677)
>    at ini.trakem2.persistence.Loader$7.run(Loader.java:3141)
>    at java.lang.Thread.run(Thread.java:662)
> ==================
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Montage-export-error-in-TrakEM2-FIJI-Dimensions-too-large-tp5002821.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: Montage export error in TrakEM2-FIJI: Dimensions too large

Stephan Saalfeld
Hi Wei,

this is the script:

https://github.com/axtimwalde/fiji-scripts/blob/master/TrakEM2/catmaid-export.bsh

edit the lines for first and last layer and the desired tile dimensions
and export path to your needs.

Please insert layers at your step-size before exporting, skipping all
existing layers.  The script will identify empty layers and generate the
required list of missing layers.

Best,
Stephan



On Fri, 2013-04-26 at 19:53 -0400, Albert Cardona wrote:

> Wei,
>
> you'll have to do the export for CATMAID with a script. Will find it on Monday.
>
> Albert
>
> On Apr 26, 2013, at 6:37 PM, Wei <[hidden email]> wrote:
>
> > Hello,
> >
> > I'm trying to export a series of large images with the Continuous release of
> > FIJI (ImageJ 1.47n) for Linux (64-bit). I'm working on a machine with 192 GB
> > RAM running Ubuntu 12.04.
> >
> > Just trying to export a single plane (80x80 array of 2048x2048 pixel tiles)
> > using Export > Make flat image, I get the error below.
> >
> > Is there any way I can adjust the maximum dimensions?  Or perhaps other
> > approaches?
> >
> > Thanks in advance for the assistance,
> > Wei-
> >
> > ==================
> > ERROR:
> > java.lang.IllegalArgumentException: Dimensions (width=163840 height=163840)
> > are too large
> >    at java.awt.image.SampleModel.<init>(SampleModel.java:112)
> >    at
> > java.awt.image.ComponentSampleModel.<init>(ComponentSampleModel.java:128)
> >    at
> > java.awt.image.PixelInterleavedSampleModel.<init>(PixelInterleavedSampleModel.java:69)
> >    at java.awt.image.Raster.createInterleavedRaster(Raster.java:638)
> >    at java.awt.image.Raster.createInterleavedRaster(Raster.java:265)
> >    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.getFlatImage(Loader.java:2677)
> >    at ini.trakem2.persistence.Loader$7.run(Loader.java:3141)
> >    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.getFlatImage(Loader.java:2677)
> >    at ini.trakem2.persistence.Loader$7.run(Loader.java:3141)
> >    at java.lang.Thread.run(Thread.java:662)
> > ==================
> >
> >
> >
> >
> > --
> > View this message in context: http://imagej.1557.x6.nabble.com/Montage-export-error-in-TrakEM2-FIJI-Dimensions-too-large-tp5002821.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

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