STL to Segmentation Looks different

I am trying to fix and segment an STL model to multiple parts.

Here is what I did

  1. An STL is loaded as segmentation.
  2. Segmentation is exported to labelmap. I believe, this is the step where things go wrong.
  3. The labelmap is saved and the saved file is loaded as volume.
  4. 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?

1 Like

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.

1 Like

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.

1 Like

The original STL file has large holes I was hopping to fix them via segmentation option. I will try fix it outside Slicer.