# Convert stl to DICOM file

**URL:** <https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643>\
**Category:** Support\
**Tags:** dicom\
**Created:** [November 16, 2020, 5:57pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643 "2020-11-16T17:57:57Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 5:57pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/1 "2020-11-16T17:57:57Z")

</div>

Hello,  
I was using 4.10.2 to convert stl to DICOM. However, after update to 4.11.2 I could not fund functionality. Can anyone help me with this?  
Thank you,  
Amy

---

<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:** [November 16, 2020, 6:43pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/2 "2020-11-16T18:43:48Z")

</div>

See step-by-step instructions for DICOM export here [https://slicer.readthedocs.io/en/latest/user\_guide/modules/dicom.html#export-data-from-the-scene-to-dicom-database](https://slicer.readthedocs.io/en/latest/user_guide/modules/dicom.html#export-data-from-the-scene-to-dicom-database)

If you have any specific questions then let us know.

---

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 5:52pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/3 "2020-11-16T17:52:37Z")

</div>

Can you please share the tip? Thank you!

---

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 7:38pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/4 "2020-11-16T19:38:03Z")

</div>

Thank you for sharing. The file I need to convert is a stl file and when I follow the instruction (right-click to “Export to DICOM”) there is no option to select the export type in the bottom left of the export dialog. I need to convert the stl file to an RT structure set. Do you mind giving me more guidance?  
Thank you,  
Amy

---

<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:** [November 16, 2020, 7:40pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/5 "2020-11-16T19:40:42Z")

</div>

You need to convert it to segmentation first. You also need the associated CT image - RT structure sets cannot be generated and interpreted without a referenced CT.

---

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 8:17pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/6 "2020-11-16T20:17:03Z")

</div>

How do I create an associated CT image? Do I import one to the software? How do I make them associated? in 4.10.2, I only need to do “Mesh to Lable Map” and then I can export it as a DICOM file.  
Thank you again for your help!

---

<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:** [November 16, 2020, 9:36pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/7 "2020-11-16T21:36:51Z")

</div>

I assumed you already have a CT image that the STL model was derived from. You can of course create a fake CT for it, but to tell if it is the right answer, we would need to know what you would like to achieve at the end.

What is the overall goal of your project? Why do you need to convert STL file to DICOM RT structure set?

---

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 10:09pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/8 "2020-11-16T22:09:13Z")

</div>

I use a 3D camera to capture the patient’s body contour which was truncated by CT (limited CT FOV). With the 3D captured body contour we can make up for the missing information. I want to import the 3D scan as an RT-struture to the TPS and fill up the missing tissue with the water.  
Thank you!

---

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 11:04pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/9 "2020-11-16T23:04:47Z")

</div>

or… can it be converted to a “CT scan”? I think it was working in that way in the old version?  
Or… is there any chance I can download the 4.10.2?

---

<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:** [November 16, 2020, 11:12pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/10 "2020-11-16T23:12:22Z")

</div>

You can load the CT, expand it using Crop volume module and a ROI, register it to the surface scan, and use Mask volume effect (provided by SegmentEditorExtraEffects extension) to fill the region inside the surface scan with 0 HU. You can then export this modified CT to DICOM and use it in your treatment planning system. I don’t think there is a need to export DICOM RT structure sets.

---

<div class="post-metadata">

**Author:** ![archery](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@archery](https://discourse.slicer.org/u/archery)\
**Post date:** [November 16, 2020, 11:24pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/11 "2020-11-16T23:24:43Z")

</div>

Do I have to load the CT? Can I just convert the stl to DICOM? I can register them in the TPS.  
Thank you!

---

<div class="post-metadata">

**Author:** ![collamaf](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/collamaf/32/13595_2.png) [@collamaf](https://discourse.slicer.org/u/collamaf)\
**Post date:** [December 21, 2021, 9:31am UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/12 "2021-12-21T09:31:49Z")

</div>

Dear @lassoan ,  
I am dealing with a task much similar to the one of @archery .  
I would like to ask you which is in your opinion the best/most efficient way to “register the CT to the surface scan”.  
I am having some good results with the module “ModelRegistration” of IGT, that however works between models, and thus requires to convert somehow the whole CT to a model (I managed to do it via semi automatic segmentation of the whole CT).  
Do you have any better suggestion?  
Thanks!

---

<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:** [December 22, 2021, 5:05am UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/13 "2021-12-22T05:05:14Z")

</div>

For quick registration you can use register the CT to the surface scan based on 4-6 matching landmark points, using Fiducial registration wizard module in SlicerIGT extension.

You might improve registration further by creating a skin surface model from the CT using Segment Editor, extract relevant surface parts using Dynamic modeler module’s “Select by points” tool, and then use “Model registration” module to compute the registration. This requires clicking around in a couple of modules, but if you need to do this regularly then the process can be automated using Python scripting.

---

<div class="post-metadata">

**Author:** ![collamaf](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/collamaf/32/13595_2.png) [@collamaf](https://discourse.slicer.org/u/collamaf)\
**Post date:** [December 28, 2021, 8:14am UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/14 "2021-12-28T08:14:48Z")

</div>

Dear @lassoan , thanks very much for the tips! I will go through them and eventually let you know in this post!  
Have a nice new year!

---

<div class="post-metadata">

**Author:** ![Mena\_Mikhail](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mena_mikhail/32/66321_2.png) [@Mena\_Mikhail](https://discourse.slicer.org/u/Mena_Mikhail)\
**Post date:** [June 7, 2023, 3:17pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/15 "2023-06-07T15:17:36Z")

</div>

hi,  
i’m trying to take an STL model from a dicom CT skull, modify it and return it as a dicom file so i can use it in navigation. The idea is to load it onto the navigation and register it to the old CT, however when i’m stuck as the exported file has no images

 ![Screenshot 2023-06-07 181710](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/8/281972d02e48506d7451fb29a6130c51a6c90719.png)

---

<div class="post-metadata">

**Author:** ![Mena\_Mikhail](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mena_mikhail/32/66321_2.png) [@Mena\_Mikhail](https://discourse.slicer.org/u/Mena_Mikhail)\
**Post date:** [June 7, 2023, 3:30pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/16 "2023-06-07T15:30:53Z")

</div>

it worked by filling the mask with 1000 HU, but the cuts are grainy  
any advise

 ![Screenshot 2023-06-07 183036](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/3/a3d3ac9f2b310ed1a4d2226eefc8011ef3bb48d9.png)

---

<div class="post-metadata">

**Author:** ![BlakeSlicer](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@BlakeSlicer](https://discourse.slicer.org/u/BlakeSlicer)\
**Post date:** [November 2, 2023, 2:34am UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/17 "2023-11-02T02:34:56Z")

</div>

Hi @lassoan, I am trying to do something similar to @archery. I would like to convert a STL file containing a segmentation of a bone back to a DICOM file similar to a CT scan for use in other software which deals with DICOM files. Is this possible? Thanks!

---

<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:** [November 2, 2023, 3:01am UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/18 "2023-11-02T03:01:08Z")

</div>

> [@Mena\_Mikhail](#):
>
> it worked by filling the mask with 1000 HU, but the cuts are grainy  
> any advise

You can use the “Soft edge” option in “Mask volume” effect to make the edges smooth.

> [@BlakeSlicer](#):
>
> I would like to convert a STL file containing a segmentation of a bone back to a DICOM file similar to a CT scan for use in other software which deals with DICOM files. Is this possible?

Yes, sure. See this topic:

> [@STL file to fake CT scan/DICOM?](https://discourse.slicer.org/t/stl-file-to-fake-ct-scan-dicom/32524):
>
> I have a STL of a segmented bone. I would like to convert the STL back to a CT scan as a DICOM to be used in another software which processes images. I’ve imported the STL files as a segmentation and can now scroll though the slices of the STL part as if it was a CT scan. Can I save these slices as DICOM?

---

<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:** [September 20, 2025, 10:17pm UTC](https://discourse.slicer.org/t/convert-stl-to-dicom-file/14643/19 "2025-09-20T22:17:34Z")

</div>

A post was split to a new topic: [Read GE .vol files](https://discourse.slicer.org/t/read-ge-vol-files/44539)
