Login  Register

FFT filter fails on large image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

FFT filter fails on large image

Pedro Almada
1 post
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)
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: FFT filter fails on large image

Stephan Preibisch
90 posts
Hi Pedro,

you can use the FFT implementation of ImgLib
(http://pacific.mpi-cbg.de/wiki/index.php/Imglib) which is included in Fiji.
In combination with the CellContainer it can deal with much larger images on
the cost of slightly slower computation speed.

At the moment, this still requires implementation, but there is a plan to
make some functionality (like FFTs) available as plugins, too. You find an
ImgLib tutorial here
(http://pacific.mpi-cbg.de/wiki/index.php/Into_ImgLib_-_Generic_Image_Processing_in_Java)
if you want to give it a shot, it includes example files on how to use FFT,
too.

Nice greetings,
Stephan

--------------------------------------------------
From: "Pedro Almada" <[hidden email]>
Sent: Tuesday, September 20, 2011 11:33 AM
To: <[hidden email]>
Subject: FFT filter fails on large image

> 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)
>