# Converting an STL file to dicom

**URL:** https://discourse.slicer.org/t/converting-an-stl-file-to-dicom/6151
**Category:** Support
**Created:** [March 14, 2019, 8:43pm UTC](https://discourse.slicer.org/t/converting-an-stl-file-to-dicom/6151 "2019-03-14T20:43:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![danielfcraft](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielfcraft/32/3261_2.png) [@danielfcraft](https://discourse.slicer.org/u/danielfcraft)
#### Post date: [March 14, 2019, 8:43pm UTC](https://discourse.slicer.org/t/converting-an-stl-file-to-dicom/6151/1 "2019-03-14T20:43:02Z")

</div>

I have an externally produced STL file (from a 3D scanner) that I would like to be converted or added to a CT study so it can be used in radiation therapy planning. I’m not sure which of the following ways would work/be best.

1. Import the STL as a segmentation, add it to an existing CT study, export the entire thing as dicom.

2. Load the STL and somehow directly export it to a new CT dicom series.

Could someone walk me through how to do one of these approaches?

Thanks.

I can import

---

<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 14, 2019, 8:50pm UTC](https://discourse.slicer.org/t/converting-an-stl-file-to-dicom/6151/2 "2019-03-14T20:50:19Z")

</div>

You need to load the existing CT study anyway to register the surface scan with the CT, so go with (1).

See instructions for DICOM export here: [https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#DICOM\_export](https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#DICOM_export)

---

<div class="post-metadata">

### Author: ![danielfcraft](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielfcraft/32/3261_2.png) [@danielfcraft](https://discourse.slicer.org/u/danielfcraft)
#### Post date: [March 15, 2019, 6:53pm UTC](https://discourse.slicer.org/t/converting-an-stl-file-to-dicom/6151/3 "2019-03-15T18:53:28Z")

</div>

How do I register the segmentation to the CT?

---

<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 15, 2019, 9:55pm UTC](https://discourse.slicer.org/t/converting-an-stl-file-to-dicom/6151/4 "2019-03-15T21:55:31Z")

</div>

There are many options but probably a landmark registration is a good start (SlicerIGT extension, Fiducial Registration Wizard module). You may follow it up with an ICP-based surface registration (SlicerIGT extension, Surface registration module). If surfaces may be deformed then you can use Segment Registration extension to align them with a warping transform.
