[Insight-users] kNN using kdTree

Bertelsen, Alvaro abertelsen at ceit.es
Fri Aug 28 04:36:24 EDT 2009


Hello,

I am working in an implementation of the k-Nearest Neighbors segmentation algorithm using kdTrees. Currently, I have a sample of "prototypes" which are measurement vectors taken from the input image with their corresponding classes. I am able to build a kdTree, populate it with the sample and search in it, getting the k nearest neighbors. However, the search only returns the measurement vectors but not the classes to which each vector belongs (e.g. the tree returns a list of vectors which say that the closest neighbors have intensities of 100, 110, 140, 150 ... but does not tell me if these belong to the class 'tumor', 'ventricles', 'white matter' or whatever). Is there a straightforward way to do this, without modifying the ITK classes? I have checked ITK's documentation and examples but I haven't been able to figure this out yet.

Any help will be greatly appreciated! All the best

-----
Álvaro Bertelsen MSc

CEIT - IK4 Research Alliance

Web: www.ceit.es<http://www.ceit.es>
Email: abertelsen at ceit.es<mailto:abertelsen at ceit.es>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090828/304e7642/attachment.htm>


More information about the Insight-users mailing list