Unable to Send Volume via OpenIGTLink in Python Script

I’m trying to send an outgoing volume with OpenIGTLink in a script Python.
The volume node is successfully put in OutGoing of OpenIGTLinkIF Node, but the client doesn’t receive it.

success = connectionNode.RegisterOutgoingMRMLNode(volumeNode)
if success:
  connectionNode.PushNode(volumeNode)

From GUI when I set the PushOnConnect On, the volume is send.

Am I doing something wrong in script?

An outgoing node is automatically sent to the connected clients/servers whenever the node is modified.

If the node is not modified then you need to push it:

  • manually by pressing a button in the OpenIGTLink module GUI or calling the corresponding method in Python
  • automatically when a new client/server connects by enabling “push on connect” (by checking the checkbox in the OpenIGTLink module GUI or calling the corresponding method in Python)