How to join two or more fiducials by a line?

How can we pass a line through two mark up fiducials ?
Or even three of them. Like making an axis to join them.

1 Like

If you have two points in a markups fiducial node ‘F’, you can create a new markups line node using the snippet:

F=getNode('F')
L=slicer.mrmlScene.AddNewNodeByClass('vtkMRMLMarkupsLineNode')
firstPoint = F.GetNthControlPointPositionVector(0)
L.AddControlPoint(firstPoint)
secondPoint = F.GetNthControlPointPositionVector(1)
L.AddControlPoint(secondPoint)

A line will only work with two points, if you have more than that you would need to use a markups curve node.

1 Like