I am trying to make a simple script.
I have created a button which the user can press. When the button is pressed, the user should then be prompted to place one markups node, when this node is placed the user should then be prompted to place another node and then no more (so two markups nodes should be placed). And then i want to get the coordinates for these nodes.
I have tried to do this by using the function
placeModePersistence = 1
slicer.modules.markups.logic().StartPlaceMode(placeModePersistence)
and a while loop that should let the user to place two nodes. However the issue is that the code creates the markups node before the user has a chance to place it on the image. What is the right way to do this?
(I also tried using the interaction nodes but got the same problem)
Thank you