[Insight-users] KDTree and Vectors with labels

Luis Ibanez luis.ibanez at kitware.com
Tue Feb 23 17:00:04 EST 2010


Hi Pete79

The itkKdTree expects a container of vectors.
When you search for  closest points in space
it will return you a list of identifiers.

If you store your labels in an array that has the
same identifiers you should be able to recover
the labels associated to each vector by using
the resulting identified in the array of labels.


    Regards,


           Luis


------------------------------------------------------------
On Tue, Feb 23, 2010 at 4:32 PM, Pete79 <pkoniusz at hotmail.com> wrote:
>
> Hiyah.
>
> I've been googling awhile to figure out if ITK implementation of KDTree
> supports labelled vectors. What I mean is I want to build a tree from a
> number of vectors which are also given labels (let's say from 0 to N-1).
> When querying for NN, I'd love to get not just a list of K nearest
> neighbours, but also their labels!
>
> Any idea how to get around this?
>
> Many thanks,
> Peter
> --
> View this message in context: http://old.nabble.com/KDTree-and-Vectors-with-labels-tp27710882p27710882.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list