Unexpected behavior in Transforms Module and IGT ResliceDriver

When tracking two instruments using the Brainlab system and OpenIGTLink:

  1. OpenIGT link transfers transforms for both instruments from BrainLab to Slicer as expected
  2. As long as only one instrument is ever visible at a time, things work as expected
    a) Transform sliders and transforms change in real time in the Transform Module as expected
    b) Slice views are controlled by the transforms assigned in the ResliceDriver as expected
  3. If at some point, both instruments become visible, the Transforms Module and ResliceDriver both behave in unexpected ways
    a) As long as both instruments are visible and until one of the instruments becomes not visible:
    • Transform sliders and transforms behave as expected in the Transforms Module
    • Slice views are controlled as expected by the ResliceDriver
      b) As soon as one of the two instruments becomes not visible and thereafter until Slicer is stopped and restarted:
    • The transform from one of the two instruments (always the same one, possibly determined by the order Brainlab sends transforms) no longer impacts the Transforms Module (sliders and transforms do not change when the instrument is moved) and the ResliceDriver (transform does not control the assigned slice view)
      c) Note that both transforms continue to be received via OpenIGTLink as expected and both emit move events. (We have an independent module that observes and records transform events. The behavior of the Transforms Module and ResliceDriver described here occurs whether or not our module is opened/activated.)

I think this may have something to do with how observers are attached/detached from transforms in the Transforms Module and ResliceDriver. However, the behavior is buried under multiple layers in vtk and MRML that I am having trouble tracing through the code.

Is there anyone familiar with these modules and/or the vtk observer model who might be able to help us with this issue? It is a blocking issue on software we used regularly during tumor resections.

Thanks!
Sarah

Hi Sarah,

It sounds very strange that your custom module can successfully observe and record the transforms, but the Transforms module cannot.

Is the MRML transform node representing the problematic instrument updated in any way when the instrument is in view of the tracker? Is there maybe another MRML node in the scene created for some reason and that is being updated?

Each MRML node has an “MTime” property that you can watch using the Node info module. That is a timestamp for when it was last modified. Is that changing while you experience the problem? If that is not changing, then most modules would not get notified about the updates. (But it should change when new messages are received from the tracker.)

When IGTL transform messages arrive in Slicer, they are converted to MRML nodes, identified by the IGTL device name and the matching MRML node name. If there IGTL device name changes, then there may be no matching MRML node, so OpenIGTLinkIF creates one that is not associated with the reslice driver. Any chance the IGTL device names changes while the problem is happening?

These are just some ideas to start thinking along. Please let me know if you figure out more.

Tamas

Hi Tamas, thanks very much for your quick reply. I will do some more sleuthing based on your suggestions. In the meantime, here are some things we’ve observed:

It sounds very strange that your custom module can successfully observe and record the transforms, but the Transforms module cannot.

Yes, we agree it is odd. We checked this several times to make sure.

Is the MRML transform node representing the problematic instrument updated in any way when the instrument is in view of the tracker? Is there maybe another MRML node in the scene created for some reason and that is being updated?

This is possible. We checked that there is only one transform per instrument listed in the Data Module. I can check to see if there are some unnamed nodes that don’t appear there.

Each MRML node has an “MTime” property that you can watch using the Node info module. That is a timestamp for when it was last modified. Is that changing while you experience the problem? If that is not changing, then most modules would not get notified about the updates. (But it should change when new messages are received from the tracker.)

When I record transforms in my module (which sees both instruments changing even when Transforms and ResliceDriver do not), I also record the times of the transform matrix – these do change with each event. I can double check in the Transforms Module to see if they change there.

When IGTL transform messages arrive in Slicer, they are converted to MRML nodes, identified by the IGTL device name and the matching MRML node name. If there IGTL device name changes, then there may be no matching MRML node, so OpenIGTLinkIF creates one that is not associated with the reslice driver. Any chance the IGTL device names changes while the problem is happening?

I can dig deeper into this, possibly by printing out all the transform nodes to see if they change when the behavior occurs. Perhaps my module identifies the transform with a field that doesn’t change while the other Slicer modules use one that does? I will see what I can discover.

I will try these next time I have access to the equipment (probably next week). Let me know if you think of other things I should test.

Sarah