FFT filter fails on large image

Posted by Pedro Almada on
URL: http://imagej.273.s1.nabble.com/FFT-filter-fails-on-large-image-tp3683140.html

Dear all,

I'm trying to run a FFT bandpass filter (0-50 pixels) on a very large image
(22848x14336, 16bit, 625MB), but I get the error reproduced below. The image
is a stitch of several 1344x1024 images. Running the filter for each image
works fine. However, if I scale down by a factor of 0.5 it works... Does
anyone have the same problem? I'm using 64bit ImageJ, version 1.45o with
20480 mb available (20gigs basically). The task manager doesn't seem to show
a bump on memory usage (which is high but not full).

My basic interpretation of the error is that ImageJ or Java seem to have an
arbiratrary limit on array sizes and the FFT algorithm creates arrays based
on the image size... Could that be it? If so, would there be a way to
increase such a limit?

Thanks,
Pedro Almada

java.lang.ArrayIndexOutOfBoundsException: -738153312
at ij.process.ShortBlitter.copyBits(ShortBlitter.java:48)
 at ij.process.ShortProcessor.copyBits(ShortProcessor.java:433)
at ij.process.ImageProcessor.insert(ImageProcessor.java:1374)
 at ij.plugin.filter.FFTFilter.tileMirror(FFTFilter.java:187)
at ij.plugin.filter.FFTFilter.filter(FFTFilter.java:96)
 at ij.plugin.filter.FFTFilter.run(FFTFilter.java:58)
at
ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:256)
 at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:105)
at ij.IJ.runPlugIn(IJ.java:158)
 at ij.Executer.runCommand(Executer.java:127)
at ij.Executer.run(Executer.java:64)
 at java.lang.Thread.run(Thread.java:619)