Is there any way in Slicer to easily obtain the transform between two tools? I am using the NDI Aurora Tracker with two coils, and can currently obtain transforms between each of the coils and the Aurora tracker, but cannot get a transform between one tool to the other. I also tried adding a transform from tool 1 to tool 2 in the configuration file but that did not seem to do what I intended. Is there a module I can use for this? Thanks!
You probably want
vtkMRMLTransformNode::GetTransformBetweenNodes which you can use on either node. See: Slicer: vtkMRMLTransformNode Class Reference
Thank you so much for the response! I don’t think I quite understand the explanation; is there any way I could get that transform via the Slicer App? Or by changing some things in the Plus configuration file?
I’m not sure you can do this at the Plus level, but if you have a custom Python script (or C++ module) you could get the
vtkMRMLTransformNode for each of the tools and then get the relative transform that could be used to map coordinates between the two spaces.
In PLUS, you can list any transform (between any two tools) in the PlusOpenIGTLinkServer, TransformNames section of the config file. E.g. if you add this line
then PLUS will automatically concatenate StylusToTracker and TrackerToReference transforms and send it to Slicer. In Slicer, it will show up as a transform node called “StylusToReference”.
@ungi is there any scenario where this method would fail? This is what I did initially which was that I had a transform called Tool1ToTool2. However, when I examined the transform while holding my two tools fixed in relation to one another, I was noticing that the translation portion of the transform was changing as I was moving the two tools in unison which made me think that I was doing something incorrectly