[Insight-developers] Pyramid Image Filters and ShrinkImageFilter vs ResampleImageFilter -- reply from Hans

kent williams norman-k-williams at uiowa.edu
Sat Mar 28 11:39:27 EDT 2009


Hans called me yesterday from an airport just after the TCON to ask how the
discussion had gone with respect to the constallation of bug reports around
the Pyramid filters.

On Monday I'm sure he'll speak for himself, but what he told me was that
using the ShrinkImageFilter in the Pyramid Filters doesn't provide useful
results, at least for his needs.

The difference beting that the ShrinkImageFilter chooses a single pixel in
the input, and then assigns it to a single pixel in the output.  This is the
case with both the older, faster method and the newer slower method we
discussed on the TCON.

The ResampleImageFilter, by contrast, interpolates, which means when you
downsample, it averages the pixels in the volume of the current pixel from
the input.

It's easy enough to see why this produces different results.  In the
simplest case, look at the answer you get if you downsample from 2x2 to 1x1:

1 0
0 1 -> ShrinkImageFilter = 1
    -> ResampleImageFilter = 0.5

If the result from the ShrinkImageFilter is the desirable behavior (for some
generally agreed-on value of 'desirable'), maybe there needs to be a second
pair of PyramidFilters that use ResampleImageFilter. But in my (admittedly
naive) estimation, it really is a good idea to use ResampleImageFilter for
the Pyramid filters.



Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.




More information about the Insight-developers mailing list