@@ -0,0 +1,1112 @@
+package net.imagej.ops.convolve;%0A%0Aimport org.scijava.plugin.Plugin;%0A%0Aimport net.imglib2.Cursor;%0Aimport net.imglib2.img.Img;%0Aimport net.imglib2.type.numeric.ComplexType;%0Aimport net.imglib2.type.numeric.RealType;%0A%0Aimport net.imagej.ops.Op;%0Aimport net.imagej.ops.fft.filter.LinearFFTFilterRAI;%0A%0A/**%0A * Correlate op for (@link RandomAccessibleInterval)%0A * %0A * @author bnorthan%0A * %0A * @param %3CI%3E%0A * @param %3CO%3E%0A * @param %3CK%3E%0A * @param %3CC%3E%0A */%0A@Plugin(type = Op.class)%0Apublic class CorrelateFFTRAI%3CI extends RealType%3CI%3E, O extends RealType%3CO%3E, K extends RealType%3CK%3E, C extends ComplexType%3CC%3E%3E%0A%09%09extends LinearFFTFilterRAI%3CI, O, K, C%3E %7B%0A%0A%09/**%0A%09 * Perform correlation by conjugate multiplying the FFTs in the frequency%0A%09 * domain%0A%09 * %0A%09 * TODO use an op here??%0A%09 */%0A%09protected void frequencyOperation(Img%3CC%3E a, Img%3CC%3E b) %7B%0A%09%09final Cursor%3CC%3E cursorA = a.cursor();%0A%09%09final Cursor%3CC%3E cursorB = b.cursor();%0A%0A%09%09while (cursorA.hasNext()) %7B%0A%09%09%09cursorA.fwd();%0A%09%09%09cursorB.fwd();%0A%0A%09%09%09C temp = a.firstElement().createVariable();%0A%09%09%09temp.set(cursorB.get());%0A%09%09%09temp.complexConjugate();%0A%0A%09%09%09cursorA.get().mul(cursorB.get());%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add CorrelateFFTRAI