[Insight-developers] Proposed requirements for convolution filters in ITK

Cory Quammen cquammen at cs.unc.edu
Wed Jun 1 11:17:02 EDT 2011


Here is what I would like to see in the convolution filters in ITK.

- Convolution filters should have the same interface to make it easy
to switch between the spatial domain and Fourier domain methods. This
suggests a class hierarchy for image convolution filters, perhaps
organized as follows:

--ConvolutionImageFilter
---SpatialDomainConvolutionImageFilter
---FourierDomainConvolutionImageFilter

- Each algorithm should take two inputs. The first is treated as the
image to convolve and the second as the convolution kernel.

- The output image should be the same size as the first input image.

- Both the image to convolve and the kernel can have an arbitrary
size. There should be no assumption that requires the kernel to be
smaller than the input image in any dimension or to have an even or
odd size.

- Results from the spatial domain implementation and Fourier domain
implementation should differ only by a tolerance when the same
settings are used for each filter and the pixel type of the images is
compatible with the underlying FFT routines used in the Fourier domain
implementation.

- The spacing of the two input images should be required to be the
same (other specialized convolution algorithms may handle other
cases). *Or* the image with coarser spacing should be resampled to the
same spacing as the image with finer spacing.

- The user must have the ability to specify which index is treated as
the center of the second input. This should default to
floor((2*index+size-1)/2) where index and size are from the largest
possible region of the kernel image input.

- The treatment of regions beyond the boundaries of the input images
should be controllable by the user. Typical choices include constant
padding, periodic, mirror, and zero-flux Neumann boundary conditions.
Default should be constant padding with a constant of zero.

- Normalization of the kernel image should be an option. Default is off.

Outstanding question:

- VNL operates only on images whose sizes are powers of two. For best
performance, FFTW requires that the largest prime factor in an image
size should be 13 or less. Input images should be padded to meet those
size constraints in the Fourier domain filter, but no such restriction
exists for padding in the spatial domain filter. Nevertheless, to
compare outputs of the spatial and Fourier domain filters, users
should be able to set the padding size in the spatial domain filter to
be the same as the padding in the Fourier domain filter. Does exposing
a class method to control this justified if it is used only for
testing? Or should testing for agreement between the spatial and
Fourier domain filters be restricted to cases where no special padding
for VNL or FFTW is required?

Please let me know what you think.

Thanks,
Cory

-- 
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-developers mailing list