What is the event to react to a point location being changed in a MarkupsNode/MarkupsLineNode?

Hi,

To react to a point location being changed in a MarkupsLineNode I’ve been using PointModifiedEvent and I am calling one function whenever the location of a point changes. However my callback function is being called even when a MarkupsLine’s point is hidden. I don’t want that since my callback function is a bit compute intensive. So what is the event for listening just to a point being modified in a vtkMRMLMarkupsLineNode?

I checked the documentation and couldn’t find one. Do I have no other way than to cache the point location and compare them?

Thanks for your help in advance.

Did you try something like this:

def setVisibility(node, visible):
  node.GetDisplayNode().SetVisibility(visible)
  if visible:
    node.DisableModifiedEventOff()
  else:
    node.DisableModifiedEventOn()

I am not hiding the line point using code. When I hide one of the endpoints of the line using the eye icon in the Markups extension this pointModifiedEvent Triggers.

I am not hiding the line point using code. When I hide one of the endpoints of the line using the eye icon in the Markups extension this pointModifiedEvent Triggers.

I need my callback function to be called when one of the control point is modified using the GUI of the Markups module. But not when the point is hidden using the eye icon using the Markups extension

1 Like