# How to write STL from dicom slices

**URL:** <https://discourse.slicer.org/t/how-to-write-stl-from-dicom-slices/6468>\
**Category:** Support\
**Created:** [April 11, 2019, 1:44pm UTC](https://discourse.slicer.org/t/how-to-write-stl-from-dicom-slices/6468 "2019-04-11T13:44:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![selvakarna](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@selvakarna](https://discourse.slicer.org/u/selvakarna)\
**Post date:** [April 11, 2019, 1:44pm UTC](https://discourse.slicer.org/t/how-to-write-stl-from-dicom-slices/6468/1 "2019-04-11T13:44:28Z")

</div>

@lassoan how to write STL from dicom slides[its like 1000 slides], ?  
How to write STL from X Y Z coordinates , this coordinates are extracted from 1000 dicom slides,?

---

<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:** [April 11, 2019, 2:01pm UTC](https://discourse.slicer.org/t/how-to-write-stl-from-dicom-slices/6468/2 "2019-04-11T14:01:12Z")

</div>

To get a surface mesh from images, you need to segment them. Segment Editor module in Slicer has many tools for this. See tutorials [here](https://www.slicer.org/wiki/Documentation/Nightly/Training#Segmentation).

> [@selvakarna](#):
>
> How to write STL from X Y Z coordinates

STL file already contains XYZ coordinates. If you need coordinates in a different file format then you can load the STL, get point positions as a numpy array, and write to file using a short Python script.
