# Can I get the index of a point in a point container?

**URL:** <https://discourse.itk.org/t/can-i-get-the-index-of-a-point-in-a-point-container/4828>\
**Category:** Uncategorized\
**Created:** [February 23, 2022, 5:20am UTC](https://discourse.itk.org/t/can-i-get-the-index-of-a-point-in-a-point-container/4828 "2022-02-23T05:20:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oddone-Scatena](https://discourse.itk.org/user_avatar/discourse.itk.org/oddone-scatena/32/2651_2.png) [@Oddone-Scatena](https://discourse.itk.org/u/Oddone-Scatena)\
**Post date:** [February 23, 2022, 5:20am UTC](https://discourse.itk.org/t/can-i-get-the-index-of-a-point-in-a-point-container/4828/1 "2022-02-23T05:20:54Z")

</div>

Can I get the index of a point in a point container?

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [February 23, 2022, 3:47pm UTC](https://discourse.itk.org/t/can-i-get-the-index-of-a-point-in-a-point-container/4828/2 "2022-02-23T15:47:29Z")

</div>

I don’t think there is such a function. You can search the point container yourself, using a `for` loop. If you want to do this query many times, you might consider using [KdTree](https://itk.org/Doxygen/html/classitk_1_1Statistics_1_1KdTree.html) or another structure to speed up the search.
