Erosion model, when contacted with another model

In the scene, there are a probe model, and femur model . I control the probe to grind femur, I want to erode the femur gradually when the probe model contact the femur model. The effect just like below.
how can i implement ? Thanks for your reading!
lsmCutting

While not really helpful to your request, it seems legitimate to question :

Was it or is it Slicer’s purpose to animate models ?

Blender comes to mind easily for this kind of highly specialized 3D animation tasks. One should perhaps master this huge beast with models created in Slicer rather.

Regards.

Maybe I talk about models interaction such as collision, intersection, difference and so on. Thanks a lot!

You can implement that kind of operation on surface models (meshes) but the operations can be time consuming and unstable depending on the resolution and other mesh properties (search for vtkPolyData booleans for details). Better would be to operate on a volume and render with volume rendering. Have look at the masking effects in the segment editor and at SlicerPrism for real time for options. What method to choose depends on your exact needs and data.

2 Likes

Note that this is not animation, but real-time surgical guidance (or surgical simulation). A very important use of Slicer is connecting it to surgical guidance systems and display position of tools and anatomy in real-time.

I agree with @pieper that if performance and robustness is the goal then a labelmap representation is the most suitable. You can see from the staircase artifacts in the animated gif above that an implicit surface representation is used (i.e., a surface generated from an internal labelmap representation), probably on a partitioned model (you don’t regenerate the entire femur, only the one or few small modified pieces). You can do this in Slicer, but since we have good support for volume rendering, it is probably much simpler to just use direct volume rendering.

Similar questions has been discussed at the forum before, some people ended up with using the Segment Editor’s paint tool, while others ended up with volume rendering.

1 Like

Auto Boolean subtraction may be helpful.

But there is no Automatic Option in this module
image

boolean operation will consume much time

what i want effect that is the robot arm control probe model to grind the femur bone model, meanwhile the bone disappear gradually. both the probe model and bone model are vtkpolydata.

Boolean mesh operations can be very fast if the mesh is partitioned, but they are inherently unstable. Advantage of representing structure as labelmap (and displaying using isosurface or volume rendering) is that it is very stable and predictable.

This question had been discussed a couple of times on this forum, please search for it and copy here links to the topics you have found for future reference. If you don’t get answers to your questions from those topics then you can ask here.