Draw a line connecting 2 landmarks using Python

Hi,

Could you please tell me how I can add a line in the 3D view connecting 2 specific landmarks using Python in Slicer?

Thank you

Hi, there is a line markup in Slicer that may just be what you need. You can find example code on how to program markup nodes here: Script repository — 3D Slicer documentation
The object type is vtkMRMLMarkupsLineNode.

Hi, thank you for your reply.

I tried to find an example that does the same I want to do but I couldn’t find it.
Can you please tell me what I should write in Python in order to define and show a 3D line connecting 2 specific vtkMRMKMarkupsFiducialNode?

Thank you