How can I avoid holes in the output when converting a model to segmentation?

I am using Slicer 5.0.2 to convert a model file (.ply) to segmentation mask image, with the following functions : 1. convert model to segmentation node; 2. export visible segmentation to binary label map.

But when I view the volume rending image of the binary label map, I find that there several holes in the surface. I want to know how to get a segmentation mask image without the annoying holes, and why the holes are generated?


Operating system:Windows
Slicer version:5.0.2
Expected behavior:
Actual behavior:

My first guess is that you are not sampling the surface models with high enough resolution to capture the shape of your model well. Try a higher sampling grid. If you’re not sure how we can explain.

To give better answers you could post some screenshots so we know what you are describing.

maybe low resolution of the model is the reason of the holes generated,
this is the original model

and the labelmap (volume rendering) after conversion is

several holes can be seen on it.
I tried to upload the the original model file (.ply), but not authorized to do so.

I’m wondering, if any chance that something in the program is not good enough converting the segmentation node to binary labelmap.

thanks for your help.

would you please give me some ideas on how to sampling the surface model with higher sampling grid. I tried to look for some parameter settings on it in Slicer, but found nothing.

See these step-by-step instructions for importing a model into a segmentation with as high accuracy as you need.

Thanks a lot! I finally get binary labelmap without holes with the instructions. But the labelmap image file saved becomes so large, from original 400K to nearly 21M.

This is normal. Labelmap representation of an object can be infinitely larger than its closed surface representation. The size of the labelmap representation depends on the chosen resolution.

If you only need to segment anatomical structures then you usually don’t need to go below the original CT image resolution, which is not that big (usually less than 512 x 512 x 512 voxels). However, if you also want to represent CAD models with high accuracy in the segmentation then you may need to increase the resolution a lot. Therefore, it can make sense to design your workflow so that you finish all your anatomical segmentations, export to model (closed surface), and combine that with CAD models (e.g., using “Combine Models” module in Sandbox extension).

If you export the segmentation to a model again then you can reduce the file size dramatically (e.g., by 99%) with barely visible change in appearance, by using the Surface Toolbox module’s Decimate option.