Hi @imagejan and @bpavie
The short answer is that it will work if you add a ‘null’ parameter for parameter 3, and move the OutOfboundsFactory to parameter 4. See the java code at the bottom of this reply.
The long answer is that this is an imperfection on my part, due to the way I set up the Parameters in the FFT version of convolve. And also (perhaps) a small issue with the ops matcher, where it will throw an exception in certain cases (instead of just reporting the match issue).
The naive (spatial) version of convolve is meant for small kernels, so there is no need for a border size (there is no reason not to extend using the filter size). The FFT version of convolve is meant for large (potentially very large) filters. In your case the kernel was large enough that the spatial version of convolve was rejected.
In the FFT version there is also an option to adjust the border size (the user may not want the image extended too much, as it may become too large). I made
borderSize the third parameter, when it should of been the fourth (after
BorderFactory) so that the “Naive” and the “FFT” version of convolve would have the same signature.
Ideally the Op Matcher would of given a more informative message. However it looks like an uncaught exception was raised when it tried to convert
// create an instance of imagej
final ImageJ ij = new ImageJ();
// launch it
final Img<T> image = (Img<T>) ij.io().open(
"http://imagej.net/images/bridge.gif"); // convenient example stack
RandomAccessibleInterval<FloatType> logKernel=ij.op().create().kernelLog(sigma, image.numDimensions(), new FloatType());
RandomAccessibleInterval<FloatType> logFiltered=ij.op().filter().convolve(image, logKernel, null, new OutOfBoundsBorderFactory());
ij.ui().show("log filtered", logFiltered);