Out of Memory while using Grid/Collection stitching plugin


I’m using FIJI on an ubuntu machine running java version 1.8.0_131. I am trying to stitch some tiles using the Grid/Collection stitching plugin. I have about 13588 tiles each of about 1000x1000 resolution. The total size of all tiles reaches 1.3 GB. I’m using Positions from file option of the plugin using a TileConfiguration.txt file that I have with all the respective approximate coordinates. I tried the ‘slower but less RAM’ option along with ‘use virtual input images’ and I still get out of memory! My machine has 8 GB of RAM and I’ve also tried assigning ImageJ a dedicated space of 7 GB which still doesn’t work. I also tried using a machine with 32 GB of RAM and a dedicated space of 30 GB for ImageJ with no luck.

Any help towards solving this is very much appreciated.


Welcome to the Forum!

So… I just checked the Grid/Collection Stitching Plugin page on the ImageJ wiki… There are some suggestions regarding ‘speed’ and ‘memory’ there you can try first. There is also a suggestion to try Downsampling that might help you address this issue…

Give those a try… and let us know if you still have no luck. But perhaps others have more experience in stitching will have better advice.


If I assume you have 8-bit image data, then 8 bit * 1000 * 1000 * 13588 gives about 13.5GB of image data. Even if your files are compressed, the final stitched image will consume that much of memory. I see no way how you can achieve this with 8GB of RAM only.

On the machine with 32GB, it might still be tight but should work. Make sure you have no other images open. You can have a look at the memory monitor (Plugins > Utilities > Monitor Memory…) to see how much memory is currently being used inside ImageJ.

1 Like