Tom and Herbie
I just noticed this recent thread as I was searching for more information about imagej fft myself. The imglib2 examples go through how to use fft here http://fiji.sc/wiki/index.php/ImgLib2_Examples#Example_6c_-_Complex_numbers_and_Fourier_transforms. This might be the approach that Herbie was referring to (it is written by Stephan Preibisch). It doesn't seem to use FFTW though it wraps a java library by Dave Hale (jtk mines). I've seen other imagej plugins use JNI to wrap fftw. But Dave Hale's benchmarks seem to show that his java versions of fft are 90% as fast as his c versions (http://inside.mines.edu/~dhale/jtk/bench/index.html). Does anybody know if this holds true when comparing to c versions of fftw?? Brian -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi,
I decided to use Dave Hale's library as it performed faster than wrapping fftw through JNI. This was some years back and wrappers might have speeded up, but I suspect the difference to be marginal as you said. The current ImgLib2 FFT implementation on the website is slightly outdated, I wrote a new n-dimensional FFT implementation based on Dave Hale's 1d FFT that makes use of all new ImgLib2 features and should be quite a lot faster and more memory efficient. I will update the Wiki page within the next weeks before the ImageJ conference end of October. You can find the implementation here: http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=tree;f=imglib2/algorithms/gpl/src/main/java/net/imglib2/algorithm/fft2;hb=refs/heads/master Nice greetings, Stephan On Sep 24, 2012, at 15:35 , Brian Northan wrote: > Tom and Herbie > > I just noticed this recent thread as I was searching for more information about imagej fft myself. > > The imglib2 examples go through how to use fft here http://fiji.sc/wiki/index.php/ImgLib2_Examples#Example_6c_-_Complex_numbers_and_Fourier_transforms. This might be the approach that Herbie was referring to (it is written by Stephan Preibisch). > > It doesn't seem to use FFTW though it wraps a java library by Dave Hale (jtk mines). I've seen other imagej plugins use JNI to wrap fftw. But Dave Hale's benchmarks seem to show that his java versions of fft are 90% as fast as his c versions (http://inside.mines.edu/~dhale/jtk/bench/index.html). Does anybody know if this holds true when comparing to c versions of fftw?? > > Brian > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Stephan
One thing I was curious about is how Dave Hale's library calculated the "fast" FFT sizes. I set a buffer size of 256 and I tried to make sure there was no extra padding (by setting "relativeImageExtension" to 0). I thought 256 would be a fast size. But when FFT optimization was set to "SPEED" this buffer got extended to 288. So I played around with things a bit and it looks like there is a "fast size" at 252 and the next one is 288. Brian On Mon, Sep 24, 2012 at 10:04 AM, Stephan Preibisch <[hidden email]> wrote: > Hi, > > I decided to use Dave Hale's library as it performed faster than wrapping > fftw through JNI. This was some years back and wrappers might have speeded > up, but I suspect the difference to be marginal as you said. The current > ImgLib2 FFT implementation on the website is slightly outdated, I wrote a > new n-dimensional FFT implementation based on Dave Hale's 1d FFT that makes > use of all new ImgLib2 features and should be quite a lot faster and more > memory efficient. I will update the Wiki page within the next weeks before > the ImageJ conference end of October. > > You can find the implementation here: > http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=tree;f=imglib2/algorithms/gpl/src/main/java/net/imglib2/algorithm/fft2;hb=refs/heads/master > > Nice greetings, > Stephan > > On Sep 24, 2012, at 15:35 , Brian Northan wrote: > > Tom and Herbie > > I just noticed this recent thread as I was searching for more information > about imagej fft myself. > > The imglib2 examples go through how to use fft here > http://fiji.sc/wiki/index.php/ImgLib2_Examples#Example_6c_-_Complex_numbers_and_Fourier_transforms. > This might be the approach that Herbie was referring to (it is written by > Stephan Preibisch). > > It doesn't seem to use FFTW though it wraps a java library by Dave Hale (jtk > mines). I've seen other imagej plugins use JNI to wrap fftw. But Dave > Hale's benchmarks seem to show that his java versions of fft are 90% as fast > as his c versions (http://inside.mines.edu/~dhale/jtk/bench/index.html). > Does anybody know if this holds true when comparing to c versions of fftw?? > > Brian > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |