# STL file created from segmentation is not smooth enough

**URL:** <https://discourse.slicer.org/t/stl-file-created-from-segmentation-is-not-smooth-enough/301>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [May 12, 2017, 7:52am UTC](https://discourse.slicer.org/t/stl-file-created-from-segmentation-is-not-smooth-enough/301 "2017-05-12T07:52:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarvraj\_Kohli](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sarvraj\_Kohli](https://discourse.slicer.org/u/Sarvraj_Kohli)\
**Post date:** [May 12, 2017, 7:52am UTC](https://discourse.slicer.org/t/stl-file-created-from-segmentation-is-not-smooth-enough/301/1 "2017-05-12T07:52:21Z")

</div>

Thanks Andras. Your suggestion helped a lot and we were able to generate a 3D stl file. However a new issue has arisen.

The stl file so obtained does not have a smooth surface. It is composed of blocks (like a pixelated image) and is therefore unsuitable for printing. Can you tell us how to overcome this problem.

Thanks  
Sarvraj

---

<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:** [May 12, 2017, 11:35am UTC](https://discourse.slicer.org/t/stl-file-created-from-segmentation-is-not-smooth-enough/301/2 "2017-05-12T11:35:08Z")

</div>

You have three options, you can use all, but the first one is the most important:

- crop your input volume to the region of interest & resample to have sufficiently high resolution using the `Crop volume` module: specify your ROI, select `Isotropic spacing`, select sufficiently low `spacing scale` value (the lower the value, the more details you can preserve during segmentation, but more memory and processing time you will need; typically 0.5 … 0.2 should work), select bspline interpolator
- smooth the labelmap representation using `Smoothing` effect in Segment editor module
- smooth the generated surface: in Segment editor module, click on the small arrow on the “Show 3D” button, choose `Set surface smoothing`, and increase the smoothing value. (in older Slicer versions, this setting was only available in Segmentations module: click `Update` button in the row of `Closed surface` representation in `Representations` section, click on `Binary labelmap -> Closed surface` rule, increase `Smoothing factor` value)
