openigtlink / SlicerOpenIGTLink

OpenIGTLinkIF module as an Slicer Extension
Other
17 stars 28 forks source link

ENH: Make some functions members of the main node class #117

Closed monicagsevilla closed 2 years ago

monicagsevilla commented 2 years ago

Functions AssignOutGoingNodeToDevice, ProcessIncomingDeviceModifiedEvent, GetMRMLNodeForDevice and CreateNewMRMLNodeForDevice have been moved from vtkInternal to main node class to be able to override them from a subclass. Extension SlicerCollaboration needs to override these functions to interpret the TextNodes received that contain xml text. This text contains attributes of nodes that can not be sent directly through OpenIGTLink (display nodes or non-fiducial markups).

Sunderlandkyl commented 2 years ago

This change looks pretty safe to me. I think that to properly support handling of custom messages, it would be better to implement a mechanism similar to the vtkIGTLToMRMLConverterFactory in the old OpenIGTLinkIF so that modules could register their own nodes to be sent over OpenIGTLink. Unfortunately that would be a major undertaking.