[Insight-users] Applying labels from KmeansModelEstimator to input image pixels

David Doria daviddoria at gmail.com
Thu Nov 11 14:25:16 EST 2010


I am trying to classify/label pixels using KmeansModelEstimator. The
output of KmeansModelEstimator is a collection of MembershipFunctions.
I get the membership functions and feed them to a
SampleClassifierFilter, along with a DecisionRule. The problems is now
how do I evaluate each pixel of the input image with these
MembershipFunctions (i.e. see which function each pixel belongs to)?

I was thinking about making a loop (using a RegionIterator) over the
image and sending each pixel one at a time through the
SampleClassifierFilter, but that seems awkward. I also though of using
a ImageToListSampleAdaptor, but it seems to lose the information about
where the pixel came from in the image.

Can anyone explain how to do this?

Here is what I've built so far:
http://www.itk.org/Wiki/ITK/Examples/Broken/Statistics/KmeansModelEstimator

Thanks,

David


More information about the Insight-users mailing list