'vtkSlicerOpenIGTLinkIFModuleMRMLPython.vtkMRMLIGTL' has no attribute 'ReceiveEvent'

Hi,

I got this issue executing this code on Slicer 4.11.0-2019-09-25:

    def addConnectorObservers(self):
       eventON = [slicer.vtkMRMLIGTLConnectorNode.ConnectedEvent, self.onStatus]
       self.cnode.AddObserver(eventON[0], eventON[1])
       eventOFF = [slicer.vtkMRMLIGTLConnectorNode.DisconnectedEvent, self.onStatus]
       self.cnode.AddObserver(eventOFF[0], eventOFF[1])
       eventWAIT = [slicer.vtkMRMLIGTLConnectorNode.ActivatedEvent, self.onStatus]
       self.cnode.AddObserver(eventWAIT[0], eventWAIT[1])
       eventRECEIVE = [slicer.vtkMRMLIGTLConnectorNode.ReceiveEvent, self.onStatus]#tof
       self.cnode.AddObserver(eventRECEIVE[0], eventRECEIVE[1]) #tof

And I got this error:

AttributeError: type object 'vtkSlicerOpenIGTLinkIFModuleMRMLPython.vtkMRMLIGTL' has no attribute 'ReceiveEvent'

Executing the same code on Slicer 4.8.1 it works fine.

Reading the doc it says that the VTK version was downgraded from 9.0 to 8.5.
Could this be related to this issue?
How could I fix this?

Thank you.

Between Slicer 4.8.1 and Slicer 4.10.2, the OpenIGTLinkIF module was reworked and moved to an extension. Probably the events were not migrated with the rest of the functionality. I’ll let you know when I’ve re-added the events.

1 Like