# PreMade Objets imported from STL files have significant changes when imported as segmentations

**URL:** <https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [February 13, 2019, 1:39pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755 "2019-02-13T13:39:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [February 13, 2019, 1:39pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755/1 "2019-02-13T13:39:45Z")

</div>

Hi everyone,

I´m trying to make something simillar to your video tutorial " How to segment multiple vertebrae in spine CT for 3D printing" and I get in trouble with this feature.

I import objets from STL files to get them as segmentations and interact them with the CT bone segmentations.

When I get the inicial segmentation from importing from Model, its surface is almost perfect. Problems became when I try to edit this segmentation or when I try to apply logical operators between them. Representation of the segmentations change from “Closed surface” to “Binary labelmap” and surface quality decrese drastically.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/1/01552ede97abc3025a498f50a956d482c3c53837.jpeg)

Grey: Original object (Model view)  
Yellow: Inicial Segmentation from Model  
Brown: Segmentation after trying to edit

As you can easily imagine, substractions of these segmentations to other from TC make inaccurate surfaces.

Is there any way to edit segmentations without changing to " Binary labelmap"?

Thanks on advance…

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 13, 2019, 6:11pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755/2 "2019-02-13T18:11:08Z")

</div>

A lot of editing operations are possible or are only well-behaved on label maps and not on surface models, which is why Slicer converts on the fly as needed (boolean operations on surface meshes are notoriously subject to failure due to rounding errors in non-trivial cases).

Typically you can get better results by defining a higher resolution grid for your conversion of surfaces to label maps, and also by adjusting the smoothing when creating surfaces from the label maps.

---

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [February 13, 2019, 7:41pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755/3 "2019-02-13T19:41:41Z")

</div>

I was pretty convinced the problem was label map conversion. Excuse me Steve, but I have no idea have to practice your solution… How can I improve my grid resolution for conversion? Should be any problem with scales making this change?  
The main editing operation I have to make is logical operator effect (substraction and copy/add) so boolean operation is the main point.  
Thanks for your help…

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 13, 2019, 8:33pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755/4 "2019-02-13T20:33:36Z")

</div>

Probably the easiest way to do this is to use a volume to define a reference grid (e.g. using the sample data if you don’t have anything else) and then use the Segmentation Geometry dialog (small button to the right of the Master volume selector) and make the segmentation finer (like a 2x or 3x oversample).

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

Maybe @lassoan or @cpinter can suggest how to do this without using a volume to define the grid.

---

<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:** [February 13, 2019, 9:32pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755/5 "2019-02-13T21:32:10Z")

</div>

If I understand the problem, then I just described the solution earlier today to someone else (it’s enough to just look at the bullet points):

> [@Difficulty with editing new segments imported as stl files](https://discourse.slicer.org/t/difficulty-with-editing-new-segments-imported-as-stl-files/5756/2):
>
> In your second screenshot you cannot edit because there is no anatomical volume selected. That’s why Segment Editor is asking you to “Select master volume to enable editing”, as shown in your screenshot as well. In the third case, I can see a master volume. If that “6: CHEST…” image occupies the same space in 3D as your imported STL, then you should be able to edit it. You can verify that by going to Volume Rendering and showing the CT in 3D. If “chaos breaks loose” means what you described ne…

It’s not the easiest workflow I know, but right now this is the best way to do it.

---

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [February 13, 2019, 10:45pm UTC](https://discourse.slicer.org/t/premade-objets-imported-from-stl-files-have-significant-changes-when-imported-as-segmentations/5755/6 "2019-02-13T22:45:11Z")

</div>

I really appreciate your help guys.  
I read your other answer @cpinter and i was trying to follow your instructions but Threshold Effect of CT from DICOMS became … I got strange surfaces in 3D… I supposed i was doing something wrong… Anyway, surfaces from STL files (its segmentations) change from perfect to ugly when I touch “Surface Smoothing” check and i was unable to came back to right visualization…

I´m trying @pieper solution and it looks the path… It improves machine needs and for any oversample over 2x, program crash when I put Show 3D button on. I have made a volumen crop throw a ROI and then oversample it till 5x. Surface quality after Threshold Effect is much better and results of substract Operator is better too.

It´s a bit tricky workflow and really cost demanding for the system resources but …

Thanks so much both.  
Any other idea will be appreciated…
