[Insight-users] itkConvolutionImageFilter

Cory Quammen cquammen at cs.unc.edu
Fri Jun 10 10:17:38 EDT 2011


Jan,

I have good news for you. We are currently working to improve the very
issues you cite.

On Fri, Jun 10, 2011 at 8:31 AM, Jan Funke <funke at ini.ch> wrote:
> Dear Insight-users and -developers,
>
> I'm very glad that we have a convolution filter now in ITK-4.0.0. This is much
> more convenient than using the neighborhood iterators explicitly every time.
>
> However, I belief that at least the documentation of this filter is incomplete.
> The points I noticed are:
>
> • It is unclear how the filter handles the border cases where the kernel does not
>  completely overlap with the image. By looking at the source code I found that
>  there is a separation of the input image according to its faces. However, it
>  seems as if the operation applied to them is the same everywhere. I understand
>  that this is the inner product of the pixels in the respective neighborhoods.
>  Therefore I would expect an image to become darker at the borders when convolved
>  with a positive constant kernel. However, this is not the case. It would be nice
>  if the documentation could shed some light on this issue.

It turns out that the boundary condition is currently a zero-flux
Neumann condition (see
http://www.itk.org/Doxygen/html/classitk_1_1ZeroFluxNeumannBoundaryCondition.html),
which probably explains what you are seeing.

I am advocating enabling you to choose which boundary condition to
use. At the very least, we will add documentation.

> • It is also unclear what exactly happens if the kernel is even-sized. The
>  resolution of the output image is the same as the input image. I guess one of
>  the 2^n center pixels is just used as the center of the kernel and shifted over
>  the whole input image. Again, a note in the documentation on that would be nice.

This is currently a bug that is actively being addressed:
http://public.kitware.com/Bug/view.php?id=12236

> • It should be mentioned somewhere whether the normalization of the kernel is
>  enabled or disabled by default.

I agree!

> By the way, I would really appreciate different border handling methods as it is
> provided by the MATLAB conv2 function (i.e., padding with zeros or cropping to
> the 'valid' convolution area). If someone could point me in the right direction
> on how to implement that using faces, I might even do it ;)

This is a feature we are working on.

Thanks,
Cory

>
> Cheers,
> Jan
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>



-- 
Cory Quammen
Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen


More information about the Insight-users mailing list