Help with Transform Inversion and Modifying PLUS Transformation in Slicer

Dear Slicer Community,

I am a beginner working through the tutorial “day2_PrototypingImageGuidedTherapyApplications,” and I need some help with transformations. The transformation I am receiving from Optitrack through PLUS is “Reference-To-Tracker,” but I require a “Tracker-To-Reference” transformation. I tried to invert the transformation in Slicer’s Transform module, but the data is quickly overwritten.

Could anyone guide me on how the inversion step is achieved in the tutorial? Is this done within Slicer or by modifying the PLUS configuration file?

Additionally, I have a question about the received PLUS transformation data (Stylus-To-Tracker). What is the significance of modifying the “Center of Transformation” in the Transform module (world vs. local)?

Lastly, I’m curious about how to handle dynamic transformations that are input into Slicer. How can I clone the transformation to preserve its current state (since cloning directly seems to result in static data)? (working in an IGT system with multiple tools)

Thank you for your help!

I would recommend adding both TrackerToReference and ReferenceToTracker in the PLUS config file in the PlusOpenIGTLinkServer section. That way, you will have both in Slicer and you can use whichever is needed.

Alternatively, you could add an observer to the Modified event of ReferenceToTracker and implement a python function in Slicer that computes its inverse or does anything else. This callback function is hopefully an answer to your last question too.

For your second question, the “Center of transformation” on the Transforms module UI is just a convenience feature that I never use. I guess it allows you to define a center of rotation in the two different coordinate systems (world meaning the 3D viewer and local meaning the the selected transform node).

If you choose Local then the displayed coordinate values are in the local (i.e., transform’s parent) coordinate system. If you choose World then the center of rotation coordinates are displayed in the renderer’s world coordinate system. You can see the difference if you apply a parent transform and modify it - Local coordinates don’t change, while World coordinates do.