n = slicer.util.getNode('F')
points = vtk.vtkPoints()
for i in range(0, n.GetNumberOfFiducials()):
point = [0,0,0]
n.GetMarkupPoint(i,0,point)
points.InsertNextPoint(point[0], point[1], point[2])
print('Yay!')
SlicerIGT extension’s Fiducial Registration wizard module does exactly this and much more. It offers a nice GUI, allows preview of results, real-time updates, helps collection of landmarks, can automatically match landmarks (even if their order is mixed up or the number of source and landmarks is not the same), compute residual error, etc.
Thank you, I tried it out and it gives me the result I need. Is there a place where I can find more information on how to use the functions in a script?
Is there any code that used the Fiducial Registration Wizard in their script? I could not find one in the repository.
I am just having trouble getting started in how to use the module. I want to to go through multiple fiducial mark up sets and find warping transform from one to another. How would I get started?
All you need to do is to add a fiducial registration wizard node to the scene and set its input markup nodes and output transform nodes, registration mode, etc. Output is automatically updated if yiy enable autó-update or call the module logic’s Update Calibration method.