Table of Content

In this post we show how to use the Paint Mask tools in the Segmentation toolset to segment knee bones. We see how to create a mask and add/remove detail manually, then extract a smooth closed surface from it.

Video

See here the video of this blog post session:

Mask from Threshold

We start with the following image, that we add to the scene using the button Open Image (or the command RMOpenImage).


Knee image.

We first open the Image Analysis tab (corresponding button or command RMImageAnalysis), inspect the image and set a threshold that gives a rough coloring of the bone area. As we want to segment bone tissue, it’s important to select a threshold such that the bone boundary is properly defined, and with as little tissue caught outside as possible. The interior is not that important at this stage as we will incorporate it latter through manual segmentation.


Thresholded image.

We then open the Segmentation tab (button or command RMSegmentation) and look over the subsection Manual Segmentation. We click the button Mask from Threshold. After some seconds, the thresholded region will become a mask. This means that we can manually add or remove detail to it.


Mask from Threshold.

Paint Mask

The way to add or remove details to our mask is through Paint Mask. We press this button, select the image and then a circular picker with the + sign will add area when clicking and dragging the left mouse button.
To remove area, we hold SHIFT and a – sign will appear. The same way as before, once we click, drag and drop the selected area will be erased from the mask.
If we hold ALT, we will change the radius of the picker. We can also change the radius in the numerical field under the Paint Mask button. We can also change the circle shape with a square, hide the mask or change its color. It is also possible to erase the whole 3D mask by clicking over the Empty Mask button.


Paint Mask.

While painting, we can move along slices in the same direction (direction Z in this case) by selecting the scroller in the Image Analysis tab. In this case, we paint all over the boundary and interior of the femur, tibia, patella and fibula bones, and remove the rest.

Surface from Mask

Once we are done with detail addition/subtraction, we inspect the slices properly in the Image Analysis tab.


After Mask Painting.

To extract this surface, we push the button Surface from Mask. We previously check the button Close Surface to make sure the output is a closed mesh. Because we added exactly the detail of the bone and remove any material outside, this mesh is properly closed and 3D printable. We can extract the Femur, Tibia, Fibula and Patella bones by using the command Explode over the mesh.


Surface from Mask.

Here you can see the full model: