# How to get the coordinates of fiducials with C++

**URL:** https://discourse.slicer.org/t/how-to-get-the-coordinates-of-fiducials-with-c/8906
**Category:** Development
**Tags:** registration
**Created:** [October 25, 2019, 7:19pm UTC](https://discourse.slicer.org/t/how-to-get-the-coordinates-of-fiducials-with-c/8906 "2019-10-25T19:19:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Haoyin\_Zhou](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/haoyin_zhou/32/3420_2.png) [@Haoyin\_Zhou](https://discourse.slicer.org/u/Haoyin_Zhou)
#### Post date: [October 25, 2019, 7:19pm UTC](https://discourse.slicer.org/t/how-to-get-the-coordinates-of-fiducials-with-c/8906/1 "2019-10-25T19:19:18Z")

</div>

Hi, if there already exist two sets of fiducials, for example “fixed” and “moving”, which are placed manually. Then how to get the list of coordinates of the two sets of fiducials?

I found the class vtkMRMLMarkupsFiducialNode, but I don’t know how to initialize it.

Thanks for any help!

---

<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: [October 27, 2019, 5:23pm UTC](https://discourse.slicer.org/t/how-to-get-the-coordinates-of-fiducials-with-c/8906/2 "2019-10-27T17:23:17Z")

</div>

You can get the node pointer from a MRML node selector from the GUI (or by node ID from the MRML scene) and then call [GetNthControlPointPosition()](https://apidocs.slicer.org/master/classvtkMRMLMarkupsNode.html#a5f20da6f3cd4904e0d1a335062ea15de).

In general, try to find a module that does something similar to what you would like to do and copy and modify that.
