I am trying to fix and segment an STL model to multiple parts.
Here is what I did
- An STL is loaded as segmentation.
- Segmentation is exported to labelmap. I believe, this is the step where things go wrong.
- The labelmap is saved and the saved file is loaded as volume.
- I used the loaded volume as master volume and did thresholding. I expected to get a result similar to the original model but I get something different.
The green color represents the original model, the blue color represents the thresholding result.
Here is the image and the original model in the 3D view.
It seems that your model is not a closed surface (I can see a large hole in the second screenshot, and there may be others). Can you try to do a “Fill holes” in the Surface Toolbox module?
Yes, it is not a closed surface. That is why I am trying to fix it. Unfortunately, filling holes does not work even with the maximum number.
A simple idea that I have is to rotate the model with a transform, then harden, then try to convert to labelmap. The converter probably works in a set direction, so there could be an orientation where it doesn’t leak out.
How did you create this STL file?
Are triangles actually missing or just oriented incorrectly? (do you still see holes if you load it as a model and in Models / Display / 3D Display / Visible sides you choose “All”?)
You may also try to fix the model using Surface Toolbox module. If that does not help you can try mesh correction options in MeshLab, MeshMixer, Blender, etc. before importing into Slicer.
The original STL file has large holes I was hopping to fix them via segmentation option. I will try fix it outside Slicer.