[Insight-users] "In place" filtering

Karthik Krishnan karthik.krishnan at kitware.com
Mon Oct 25 01:51:12 EDT 2010


On Mon, Oct 25, 2010 at 11:14 AM, Dan Mueller <dan.muel at gmail.com> wrote:

> Hi David,
>
> As Karthik says, a true "in-place" filter overwrites each pixel of the
> input buffer with the resultant output pixel value and then passes the
> input buffer as its output. All filters capable of this should inherit
> from itk::InPlaceImageFilter (if you find one that doesn't, please let
> us know). You to turn on/off this functionality eg.
> filter->InPlaceOn(), filter->InPlaceOff().
>
> The itk::MeanImageFilter does not inherit from
> itk::InPlaceImageFilter, the reason being it is a neighbourhood
> operation; neighbourhood operations *cannot* be run in-place (the
> output for one pixel may be used as the input for another pixel!).
>

Indeed.. thanks for pointing this out.. You will give you funny results if
you try out the GraftOutput thing on the MeanImageFilter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101025/dea7bbc4/attachment.htm>


More information about the Insight-users mailing list