Hello, I am trying to have a 3D view camera in Slicer follow the position and orientation of a tracked tool using SlicerIGT. By following the tutorials I have successfully tracked a tool and gone through the pivot and spin calibrations and can see the tracked tool and registered object moving through 3D space in correct relation to each other in the 3D Slicer views. I now want to set up the second 3D view camera to be looking out from the tip of the tool (like a laryngoscope camera).
I think this is what the “Bullseye” mode of the Viewpoint module of SlicerIGT should do, but I think I am maybe not using it correctly. I created a linear transform node, placed it as the parent transform node of the camera, and chose it as the “Camera positioning transform”. I wasn’t sure whether to have the parent transform of that camera transform be the “ToolTipToTool” transform or the “ToolToReference” transform, so I have tried both. I chose 6DOF and did not change the zoom or translation settings and left “Parallel projection” unchecked. I clicked “Enable Bullseye View Mode”, and the camera view did successfully move around with the tool, but the location and orientation of the view was not what I wanted. Instead of looking outward towards in the direction the tool pointed, the camera looked backwards along the shaft of the tool. When I tried some simple modifications to the camera parent transform (like changing signs of the ones on the diagonal) I got changes in view orientation, but also undesired changes in camera position.
I’m sure all I need is a transform that points the camera in the direction I want in the location I want relative to the tool, and then the parent tracked transforms will move things around as I would like, but I’m having trouble figuring out how to get this set up properly. I’m also not sure whether I need to (in addition to having the proper parent transform on the camera) adjust the camera FocalPoint or ViewUp direction, or whether these will basically just be part of the parent transform. It seems like the Bullseye View Mode is probably designed to set the camera up more or less in the way I want, but I’m not sure what I am doing wrong in using it, and I can’t find any documentation which would help me sort through it. Specifically, I want to know:
- what should the transform hierarchy look like?
- which transform in that hierarchy should be chosen as the “camera positioning transform” in the Viewpoint module?
- what should happen when I enable Bullseye View Mode?
- what should happen when I disable it again? (in my experiments so far, disabling seems to have no effect, the camera continues to move with the tracked tool (because the tracked transform is still above the camera in the transform hierarchy))
- do I need to do anything to change or reset the FocalPoint or ViewUp direction on the camera before or after using Bullseye Mode?
Also, if these questions would be better asked somewhere else, please let me know and I will ask there.