# STL to Segmentation Looks different

**URL:** <https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128>\
**Category:** Support\
**Created:** [March 13, 2019, 10:30am UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128 "2019-03-13T10:30:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)\
**Post date:** [March 13, 2019, 10:30am UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128/1 "2019-03-13T10:30:16Z")

</div>

Hi,  
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.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/4/246510886f40486a356a337dc9051f98cb2a5e44.png)

Here is the image and the original model in the 3D view.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/f/6ff8eff35a66ddf06ac248f5c86a97212b351c00.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [March 13, 2019, 12:45pm UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128/2 "2019-03-13T12:45:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)\
**Post date:** [March 13, 2019, 12:50pm UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128/3 "2019-03-13T12:50:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [March 13, 2019, 1:12pm UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128/4 "2019-03-13T13:12:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 13, 2019, 1:16pm UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128/5 "2019-03-13T13:16:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)\
**Post date:** [March 13, 2019, 1:19pm UTC](https://discourse.slicer.org/t/stl-to-segmentation-looks-different/6128/6 "2019-03-13T13:19:14Z")

</div>

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