[Insight-users] Proper Filter

Brady McCary brady.mccary+ITK at gmail.com
Wed Jan 27 16:29:29 EST 2010


insight-users,

What is the proper filter type to subclass for an operation like this:

sum = 0

for each pixel p in an image
    sum = sum + f(p)

return sum

The result of this operation is the sum, not another image, so making it a
subclass of itk::ImageSource or itk::ImageToImageFilter or
itk::InPlaceImageFilter doesn't seem right. The class
itk::ProjectionImageFilter is closer, but it is still a subclass of
itk::ImageSource, and I am interested in projecting all the way to a scalar
not another image.

Currently I am using itk::InPlaceImageFilter, telling the filter to operate
in-place because I wanted to use itk::ImageSource::ThreadedGenerateData and
friends.

Such a class is probably there and I'm just not seeing it.

Brady
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100127/5460776a/attachment.htm>


More information about the Insight-users mailing list