Single markup fiducial event listener


Is there any way how to observe events for a single markup fiducial? My goal is to detect a change of fiducial position.


(Steve Pieper) #2

The event includes the index as call data.

You can decorate your python callback with the type, and then you know which control point was being interacted with.

You’ll still get events for any of the points being changed, but you can ignore any you don’t want to process.

def callback(node,event,index):
    print(node, object, index)
markupNode.AddObserver(slicer.vtkMRMLMarkupsNode.PointModifiedEvent, callback)
1 Like