Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
SmoothingRecursiveGaussianImageFilter with sharp discontinuity to background produces negative values in output #1425
SmoothingRecursiveGaussianImageFilter, as for example, implemented in ANTs' SmoothImage https://github.com/ANTsX/ANTs/blob/master/Examples/SmoothImage.cxx produces negative values for images with an object in the foreground surrounded by "0" or some very small value produces negative values after smoothing.
Steps to Reproduce
No negative values
Linux Ubuntu 14.04
This may be expected for this implementation of the Gaussian. Here is the referenced paper:
Thanks, I suspected the implementation details might be the cause.
Unfortunately, I think this may cause some issues with registration, since RecursiveGaussian was set as the default for optimizers as of 569a470 it can create features which aren't actually present.
At least a documentation update is warranted, beyond that I'm not sure what to do about it in general.