Package util

Class FFTConvolution<R extends net.imglib2.type.numeric.RealType<R>>

java.lang.Object
util.FFTConvolution<R>

public class FFTConvolution<R extends net.imglib2.type.numeric.RealType<R>> extends Object
Computes the convolution of an image with an arbitrary kernel. Computation is based on the Convolution Theorem (http://en.wikipedia.org/wiki/Convolution_theorem). By default computation is performed in-place, i.e. the input is replaced by the convolution. A separate output can, however, be specified. The class supports to sequentially convolve the same image with different kernels. To achieve that, you have to call setKeepImgFFT(true) and for each sequential run replace the kernel by either calling setKernel(RandomAccessibleInterval< R > kernel) or setKernel(RandomAccessible< R > kernel, Interval kernelInterval). The Fourier convolution will keep the FFT of the image which will speed up all convolutions after the initial run() call. NOTE: There is no checking if the sizes are compatible. If the new kernel has smaller or larger dimensions, it will simply fail. It is up to you to look for that. NOTE: This is not influenced by whether the computation is performed in-place or not, just the FFT of the image is kept. In the same way, you can sequentially convolve varying images with the same kernel. For that, you simply have to replace the image after the first run() call by calling either setImg(RandomAccessibleInterval< R > img) or setImg(RandomAccessible< R > img, Interval imgInterval). The Fourier convolution will keep the FFT of the kernel which will speed up all convolutions after the initial run() call. NOTE: There is no checking if the sizes are compatible. If the new input has smaller or larger dimensions, it will simply fail. It is up to you to look for that. NOTE: This is not influenced by whether the computation is performed in-place or not, just the FFT of the kernel is kept.
Author:
Stephan Preibisch, Jonathan Hale