# Load segmentation and export surface mesh as model .ply

**URL:** <https://discourse.slicer.org/t/load-segmentation-and-export-surface-mesh-as-model-ply/2646>\
**Category:** Support\
**Created:** [April 20, 2018, 12:57pm UTC](https://discourse.slicer.org/t/load-segmentation-and-export-surface-mesh-as-model-ply/2646 "2018-04-20T12:57:47Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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 14, 2018, 8:54pm UTC](https://discourse.slicer.org/t/load-segmentation-and-export-surface-mesh-as-model-ply/2646/5 "2018-05-14T20:54:16Z")

</div>

You can use `slicer.util.loadSegmentation` for loading a segmentation from file.

> <https://github.com/Slicer/Slicer/blob/a99595c98da13f87d16705ea5370edb3521179e2/Base/Python/slicer/util.py#L352-L354>

Note that in recent nightly versions of Slicer, you can export segmentation directly to stl or obj files. See [Save segmentation directly to STL or OBJ files](https://discourse.slicer.org/t/save-segmentation-directly-to-stl-or-obj-files/2428) post for details and [API documentation](http://apidocs.slicer.org/master/classvtkSlicerSegmentationsModuleLogic.html#a9578121589a3b5e20a05aa8dce33c642) for description how it can be used from script.

---

_[View the full topic](https://discourse.slicer.org/t/load-segmentation-and-export-surface-mesh-as-model-ply/2646)._
