I have a Python loadable scriptable module that creates a custom workflow. The module contains tables of nodes (such as MarkupsROINodes and MarkupsLineNodes) and provides a checkbox for the user to change their visibiliity.
I am observing these nodes using node.AddObserver(vtk.vtkCommand.ModifiedEvent, myCallback) to detect if they have been deleted so they can be removed them from the module’s table. How do I observe their visibility status (in case it has been changed through another menu)? I tried node.AddObserver(vtk.vtkMRMLDisplayableNode.DisplayModifiedEvent, myCallback) but this didn’t seem to pick up any events.