[Insight-users] kmeans image filter

Luis Ibanez luis.ibanez at kitware.com
Wed Aug 9 20:13:53 EDT 2006


Hi Aditya,

This functionality is not directly available in the K-Means filter,
but you can implementing with several modifications in the code.

First you need to apply a segmentation method for creating
a binary mask over what you consider to be the "background".

Then you need to modify the itkScalarImageToListAdaptor in order
to take a binary mask as a second input. Then, inside the adaptor
you visit all the pixels of the input image that are also ON
in the binary mask, and you insert only those pixels in the
SampleList that is produced as output of the adaptor.

The subsequent K-Means computation is only performed on the
intensity values that are included in the ListSample.



     Regards,


        Luis





-------------------------
Aditya Chandramouli wrote:
> Hi,
> 
> The problem I seem to be having with ScalarImageKmeansImageFilter is that the 
> classification "grounds" one of the classes to intensity 0, therefore making 
> it indistinguishable from the background.
> 
> I would like to separate the image from the background. How would I do this?
> 
> Any help would be greatly appreciated. 
> 
> thanks,
> 
> aditya
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 




More information about the Insight-users mailing list