In 3D Slicer, is it possible to simulate femur cut in real-time without iMSTK?

Hi,

Support and development of iMSTK has been discontinued since May-02-2025.

I would like to simulate femur cut in real-time with 3D Slicer. I have tried Mask volume effect, but it is not fast enough (the FPS is very low).

In 3D Slicer, is it possible to simulate femur cut in real-time without iMSTK?

Thanks in advance,

Best regards,

Vincent

Hi,

@jcfr , @Sam_Horvath would you mind giving me some advice ?

Thanks in advance,

Best regards,

Vincent

Maybe you want the Dynamic Modeler or maybe you can get by with just Clipping.

Yes, you can use Dynamic Modeler module’s ROI cut tool to simulate bone cut in real-time.

Just a simple demo (with a little Python scripting you can make the cut incremental, apply constraints, etc.):

@pieper @lassoan Thank you so much for your help.

@lassoan would you mind sharing your code with me?

I have tried the Dynamic Modeler widget. When I click Continuous update of Apply button for ROI cut, the FPS of 3D Slicer becomes very low instantly.

I didn’t do any scripting, so there is nothing to share. M

About performance: Image segmentation provides an extremely dense mesh. You can usually remove 95 to 99.9% of the points without any visible difference (using Surface Toolbox’s uniform remeshing or decimation tools). You can also some off parts into separate models that you are sure the user will not cut into (e.g., the femur head and the lower half of the femur). This way the model your will have to interactively cut will have 100-1000x less points, so the updates will be extremely fast. In general, when you are doing real-time simulation, the default high- accuracy computations would take to much time, so you often need to do similar tricks and various fast approximations.

@lassoan thank you so much. I will try the ticks you suggests later.

I have one more question. How to set the same model as both of input model node and Clipped output model node (outside) for running Continuous update of ROI cut.?

Dynamic Modeler widget does not allow me to set the same model as both of input model node and Clipped output model node (outside) for running Continuous update of ROI cut.

If I clone my bone model and set the cloned bone model as Clipped output model node (outside) and then set my bone model invisible, the consequence is that the removed part of bone recovers when ROI node move away from the bone model. Therefore I think I need to set the same model as both of input model node and Clipped output model node (outside) for running Continuous update of ROI cut.