# Find needle tip position automatically by segmentation during needle insertion

**URL:** <https://discourse.slicer.org/t/find-needle-tip-position-automatically-by-segmentation-during-needle-insertion/5864>\
**Category:** Support\
**Tags:** extensions-manager\
**Created:** [February 21, 2019, 7:03am UTC](https://discourse.slicer.org/t/find-needle-tip-position-automatically-by-segmentation-during-needle-insertion/5864 "2019-02-21T07:03:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![s12359e](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@s12359e](https://discourse.slicer.org/u/s12359e)\
**Post date:** [February 21, 2019, 7:03am UTC](https://discourse.slicer.org/t/find-needle-tip-position-automatically-by-segmentation-during-needle-insertion/5864/1 "2019-02-21T07:03:21Z")

</div>

Operating system: Win10  
Slicer version:4.10.0  
Expected behavior:

I make the needle insertion to the phantom as the picture shown.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/9/b9678d463814c58dbc000103f8c5bddab9f22117.png).  
I wanna find the needle tip location automatically by segmentation or sort of that.  
I try “needle finder” this extensions but I hit “start Giving control point” it didn’t work.  
Now i just manually put the fiducial point on the slicer and find the tip position.

Does anyone know how can I figure it out by another methods?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Yitian\_Xian](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yitian_xian/32/15171_2.png) [@Yitian\_Xian](https://discourse.slicer.org/u/Yitian_Xian)\
**Post date:** [December 7, 2022, 6:24am UTC](https://discourse.slicer.org/t/find-needle-tip-position-automatically-by-segmentation-during-needle-insertion/5864/2 "2022-12-07T06:24:04Z")

</div>

Hello, may I know how to configure the needle finder file in my computer? Thanks!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 8, 2022, 3:03am UTC](https://discourse.slicer.org/t/find-needle-tip-position-automatically-by-segmentation-during-needle-insertion/5864/3 "2022-12-08T03:03:04Z")

</div>

NeedleFinder project repositories are available here:

> **[NeedleFinder](https://github.com/needlefinder)**
>
> Needle segmentation from MRI. NeedleFinder has 10 repositories available. Follow their code on GitHub.

A simple fully-automatic needle detection algorithm is also discussed here:

> [@How to measure tip position error and angle error between two needles in CT image?](https://discourse.slicer.org/t/how-to-measure-tip-position-error-and-angle-error-between-two-needles-in-ct-image/26626/2):
>
> Manually specify a line markup that is aligned with needle takes less than one minute (one click near the tip in the 3D view, then click on the dropped point and adjust in slice views; then repeat this for another point along the needle shaft, as far as possible from the tip). You could automate the process quite easily, as the needle has very high voxel value, a unique shape, and it is not connected to any other object. For example a fully automatic process could be the following: do threshol…

If you need to find contrast-filled markers (not needle voids) then you may find the robust tubular marker detection algorithm in ProstateNav useful:

> <https://github.com/ProstateBRP/ProstateNav/blob/master/TransRectalProstateRobot/vtkTransRectalFiducialCalibrationAlgo.cxx>
