[Insight-developers] Adding an Extrapolator to ResampleImageFilter

Matthew McCormick (thewtex) matt at mmmccormick.com
Sun Jun 26 17:44:48 EDT 2011


Hi,

In response to this letter on the user's mailing list:

http://thread.gmane.org/gmane.comp.lib.itk.user/33954/focus=33959

and my own experiences, this patch was created:


http://review.source.kitware.com/#change,1987

In this patch, an Extrapolator member is added to ResampleImageFilter,
so this can be chosen by the user like the Interpolator.  This allows
a user to mix and match Extrapolators and Interpolators without
requiring copy/pasting of code.

This keeps the prior behavior of using a DefaultPixelValue when a
sample is taken outside the input image, but the Extrapolator is used
if it is set.  It is possible to create an Extrapolator class that
just returns a DefaultPixelValue, but the prior implementation is kept
for efficiency.

Many of the examples use brain images where there is empty spaces at
the edges of an image, but for many other situations a
DefaultPixelValue is not ideal.

Please take a look and review.

Thanks,
Matt


More information about the Insight-developers mailing list