FPS deteriation after prolonged fiducial registration

Hi everyone,

Currently, I am working on a tracked phantom and tool setup. I load the segmented phantom model and 4 associated registration points, and start receiving transforms via OpenIGTLink interface. Then the received sensor positions are continuously registered using the Fiducial Registration Wizard (rigid transform, automatic point matching and auto-update). The loaded model is attached to the resulting transform and thus moves accordingly in the 3D view.
I am working on a HP z2 mini g4 running on Windows 10 with Slicer version: 4.11.
Expected behavior: I would expected the framerate to stay constant at the initial +/- 30 fps.
Actual behavior: A gradual decrease in framerate is observed, where fps is halved every 15-20 minutes.
I have tried downsizing the model or setting manual point matching, however both show the same framerate drop. Furthermore, when the FRW is stopped the framerate instantly recovers to the initial 30 fps, and stays there until the FRW is started again. In that case it will directly drop to the fps of before switching off the FRW and continue a gradual decrease from there.

What could be the cause of the framerate drop and what could be done to prevent it from happening?

Thanks for any help!


Wouter ten Bolscher

Thanks for the detailed report. It does sound like some kind of resource management issue.

Probably the best is to find a way to profile the code and see where it is spending time and how that changes over time and with the wizard turned on and off. On linux you could use perf and on mac you can use Instruments for this, but I’m not sure what’s suggested on Windows. I’ll bet @lassoan knows though.

There should be no need to keep fiducial registration wizard running. Once you computed the transform between the patient image and the patient-attached marker, that transform should remain constant. Can you share your scene so that we have a better idea of your setup?

Thanks for the quick responses. I’ve attached a link to the scene.
We use continuous FRW to update the pose of the segmented phantom. Two 5DOF sensors are embedded in the phantom and based on this 5DOF information 2 points per sensor are defined (on x distance from sensor position along the z-axis, see code below), resulting in a total of 4 points. We assume the relationship between the sensors to be rigid and therefore the 4 points (when not placed ambiguously) can be used for 6DOF registration of the phantom.
We could circumvent use of continuous FRW by sensor fusion of the two sensors, resulting in one 6DOF continuously updated transform, which in turn could be transformed to CT coordinates with a constant registration transform. However, to my knowledge there is no easy way of 5DOF-6DOF sensor fusion in Slicer, right?
In short, we use the automatic update option in the FRW to solve a sensor fusion problem.

def TransformMarkups(caller, event):
M_SensToEM = caller.GetMatrixTransformToParent()
p1 = M_SensToEM.MultiplyPoint([ 0, 0, -10, 1])
p2 = M_SensToEM.MultiplyPoint([ 0, 0, 10, 1])
markupsNode_EM.SetNthFiducialPosition(0, p1[0], p1[1], p1[2])
markupsNode_EM.SetNthFiducialPosition(1, p2[0], p2[1], p2[2])

Best @lassoan,

Did you have a chance to look into our problem or do you need any additional information? Hope to hear your take on our issue.

Kind regards

I’ve managed to reproduce and fix the issue. It’ll be available tomorrow: if you use Slicer Stable Release then reinstall SlicerIGT extension; if you use Slicer Preview Release then upgrade to the latest Slicer Preview Release.

Great, thank you so much @lassoan! Amazing to see this level of support on the forum!


Thank you. It would be great if you could write a short post in the “Success stories” category about what you do and how Slicer and the community helped you to achieve your goals. A few sentences (and a nice image, if there is anything that you can share) would suffice. It would help us in getting more grant funding.

1 Like