Closed Xanthorapedia closed 4 years ago
Hi @Xanthorapedia!
Thanks for pointing this out. I started work on a fix on the pass-oobf
branch, if you would like to take a look
I also made the same change (it was a simple change) https://github.com/imagej/imagej-ops/commit/a8fe660341993196253af5ba20156422974cc467
I added a test as well if it is useful... feel free to erase my branch. As I mentioned it was a very trivial change.
Awesome @bnorthan! Great minds think alike!
I might just add my comment to your commit for posterity and then delete my branch, if that is alright with you. Then we can file a PR.
No problem.
Thanks guys for your super-fast response! One last thing I found a little annoying is this debug message print out. Consider turning it into a log or removing it?
@Xanthorapedia see #630
@gselzer Awesome. Thanks!
When
ops.filter().convolve()
is called with argumentsRAI, RAI, OutOfBoundsFactory
, the result seems as if the input was padded byOutOfBoundsConstantValueFactory
with value 0 instead of as specified by the last argument.Example:
Results: Both outputs look the same, although I expect the later to at least have some white "bleed-through" at the top and left edges.
It seems the input is first padded by the matched Op
PadAndConvolveFFTF
with the specifiedOutOfBoundsFactory
but later padded again byAbstractPadAndFFTFilter
with zeros. The first padding keeps the image dimensions the same while the second extends the boundary by 1/2 kernel size, which catches all out-of-bound access to the input image when computing FFT.