How to get the coordinates of fiducials with C++

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!

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().

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