# Process to Import an STL File and Convert/Export a Series of DICOM Files?

**URL:** <https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906>\
**Category:** Support\
**Tags:** dicom, file-export, stl, file-import\
**Created:** [January 22, 2020, 4:00pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906 "2020-01-22T16:00:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleesdesigner](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aleesdesigner](https://discourse.slicer.org/u/aleesdesigner)\
**Post date:** [January 22, 2020, 4:00pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/1 "2020-01-22T16:00:12Z")

</div>

Hi,

I’m hoping someone can help with a workflow to import an STL file into Slicer, convert it to a series of DICOM files and export those DICOM files. I’ve checked other forums and can’t find anything that gives a step-by-step of the process. Thank you in advance for the help!

Andrew

---

<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:** [January 22, 2020, 4:01pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/2 "2020-01-22T16:01:05Z")

</div>

How would you like to export the segmentation: DICOM segmentation object, RT structure set, or fake CT/MRI?

---

<div class="post-metadata">

**Author:** ![aleesdesigner](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aleesdesigner](https://discourse.slicer.org/u/aleesdesigner)\
**Post date:** [January 22, 2020, 4:36pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/3 "2020-01-22T16:36:13Z")

</div>

Hi Andras, I’m interested in exporting a series of DICOM files similar to what is typically imported into Slicer from a CT scan.

---

<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:** [January 22, 2020, 4:41pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/4 "2020-01-22T16:41:11Z")

</div>

So, would you like to generate a synthetic CT scan from an original CT scan, blanking out regions that are outside a selected segment?

---

<div class="post-metadata">

**Author:** ![aleesdesigner](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aleesdesigner](https://discourse.slicer.org/u/aleesdesigner)\
**Post date:** [January 22, 2020, 5:01pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/5 "2020-01-22T17:01:48Z")

</div>

Not necessarily. I have a 3D model that I’ve saved in STL format that I need to generate DICOM file for. The DICOM files should be the same format as what is generated from a CT or MRI scan.

---

<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:** [January 23, 2020, 12:30am UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/6 "2020-01-23T00:30:40Z")

</div>

STL is a mesh, while CT and MRI are images, so you cannot save in the same format. They are very different kind of data.

You can convert the STL surface mesh to an image for example by blanking out areas inside and/or outside the surface mesh.

Can you tell more about your use case? What software will use the exported STL mesh and how?

---

<div class="post-metadata">

**Author:** ![aleesdesigner](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aleesdesigner](https://discourse.slicer.org/u/aleesdesigner)\
**Post date:** [January 23, 2020, 1:18pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/7 "2020-01-23T13:18:41Z")

</div>

Here’s my process:

1. Import DICOM data from a patient CT scan into Slicer.
2. Export patient 3D volume to STL file.
3. Create a 3D component in SolidWorks.
4. Export 3D component from SolidWorks to STL file.
5. Combine STL files generated from both Slicer and SolidWorks in Meshmixer and export as a new STL file (3D mesh - not just surface mesh)
6. Import new STL file into Slicer.
7. Create 3D segments and export to DICOM files.
8. Open and review DICOM files in a piece of equipment designed to open and review standard CT/MRI scan DICOM files.

I just need help defining the process for steps 6 and 7. Thanks!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [January 24, 2020, 10:03am UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/8 "2020-01-24T10:03:22Z")

</div>

If I understand your needs correctly, given that you will need labelmaps anyway, you can skip the Meshmixer step and do that in Slicer as well. What I can imagine:

1. Do not export it to STL
2. No change
3. No change
4. Import SolidWorks STL into Slicer -\> Convert it to segmentation node (if you want to make sure the labelmap geometry matches the CT, you can create empty segmentation in Segmentations module, change master to Closed surface, import STL part, and “advanced create” the labelmap specifying the CT as reference volume) -\> Change master to Binary labelmap -\> Import “patient 3D volume” that you mention in step 2 (whatever it means…) in this segmentation node -\> In Segment Editor, use the Logical operators to unify the part and the “patient volume”
5. Not needed
6. In Segmentations module, Export segmentation to labelmap, specifying the CT as reference volume (in Advanced section of Import/Export) -\> In Volumes module, change the volume type from labelmap to scalar volume -\> In Data module, drag&drop it in the same study as the CT -\> Right-click it, Export to DICOM

---

<div class="post-metadata">

**Author:** ![Juicy](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@Juicy](https://discourse.slicer.org/u/Juicy)\
**Post date:** [January 24, 2020, 9:39pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/9 "2020-01-24T21:39:37Z")

</div>

@cpinter this is very useful advice.

My only comment would be that @aleesdesigner probably needs to design something around the patient’s bone/tissue geometry so would need to export the file at step 2 in order to load it into Solidworks.

If I am interpreting your need correctly, my suggestion would be:

1. Import DICOM data from a patient CT scan into Slicer.
2. Export patient 3D volume to STL file.
3. Import patient STL into Solidworks and create a 3D component in SolidWorks WITHOUT moving the location of the patient STL file in 3D space in Solidworks.
4. Export 3D component from SolidWorks to STL file.
5. Import the 3D component STL from Solidworks into Slicer. As long as you have not changed the coordinate system in Solidworks then it should appear in exactly the right place on the patient’s bone/tissue in slicer.
6. Go to Segmentations module (not segment editor). Select the segmentation node which you used to originally segment the patient’s bone/tissue. Go to Import/Export models and labelmaps area and import the model into the segmentation node.
7. Go to segment editor, click on you original patient bone/tissue segment and then click the logical operators effect. Select Add and add the solidworks model segment to the original segment. (Instead of using meshmixer)
8. Go back to the segmentations module, click on the newly combined segment and using the same Import/Export area export the segment as a label map.
9. Go to the volumes module and convert the new label map to a scalar volume.
10. Go to data module and right click on the new volume and select export to DICOM.
11. Open and review DICOM files in a piece of equipment designed to open and review standard CT/MRI scan DICOM files.

Note that the dicom file is just a completely black and white image. All the bone contrast is lost. You might have to do something a bit more fancy to combine your model volume on top of the original volume if you still want the original bone contrast but I am pretty sure it would be possible.

I tried this out and it worked well for me. Thanks to @cpinter for the extra tips about converting back to a scalar volume etc.

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 18, 2025, 9:10pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/10 "2025-12-18T21:10:25Z")

</div>

Hi there. My use case for Slicer is similar, but with a key difference: I need to import an STL surface mesh of a physical object (either from an optical scanner or a CAD design) and then export it as a stack of DICOM images representing cross-sectional slices of the surface contours.

So far, I have successfully opened my STL file as a “model,” but I am unable to visualize any slice images from it. (Importing the same data as a “segmentation” does not display any object information.) This STL was not generated by SolidWorks.

What specific characteristics does the STL file require for this to work? I am exploring alternative software options, but I would first like to determine if Slicer can accomplish this task—specifically, exporting the 3D object as a stack of 2D DICOM images.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 18, 2025, 10:43pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/11 "2025-12-18T22:43:22Z")

</div>

After you import model as segmentation, right click on the segmentation and choose export labelmap. Then you can use that labelmap to export to dicom.

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 18, 2025, 11:37pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/12 "2025-12-18T23:37:14Z")

</div>

Great, this works good. Unfortunately on Blender I safe the object file very tiny. Can I ajust the scene in 3D Slicer? The section images on default only alow me three steps: -1, 0, 1 mm. I would love to refine these steps.

 ![Screen Shot 2025-12-18 at 17.33.13](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/4/f43b3a1579f35bf8273663489069a5bd0e8fb202.png)

 ![Screen Shot 2025-12-18 at 17.31.01](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/9/79ed3d0f6f2e3e3f23f1fa4c169a7888fc1b9ca1.png)

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 18, 2025, 11:47pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/13 "2025-12-18T23:47:44Z")

</div>

![Screen Shot 2025-12-18 at 17.45.15](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/7/77fe001b86d3939207e891496cd47672c4c16aa3.png)

I would appreciate, if zooming into the 3D volume would adjust the three predefined section images… This might not be the case, this I only recognize green dots in the center. How can I zoom into the section images?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 19, 2025, 12:03am UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/14 "2025-12-19T00:03:10Z")

</div>

> [@Verena](#):
>
> I safe the object file very tiny.

Slicer assumes the unit in your STL are millimeters, since mm is its default unit and STL does not have a way to tell Slicer what those units are. You can use the transforms module to scale your model up/down and then you can do the conversions again.

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 19, 2025, 4:54pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/15 "2025-12-19T16:54:46Z")

</div>

Thank you very much for your attention. I checked the Tranforms Model and attach some outcome. Still, I am on the wrong way. Could you help me out, please? I still believe Slicer is my option on this task. Best regard, Verena

 ![Screen Shot 2025-12-19 at 10.51.08](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/4/c49e3e6d2506ec67a1b7adbabb53c2ddfed269d2.png)

 ![Screen Shot 2025-12-19 at 10.37.20](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/1/b1939a27362570781d903f1b4196cbd3e28e70f9.jpeg)

 ![Screen Shot 2025-12-19 at 10.36.13](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/6/e671c4aacc31cf2ed7aff6e1f4770abd99f9061f.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 19, 2025, 5:30pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/16 "2025-12-19T17:30:12Z")

</div>

> [@Verena](#):
>
> I checked the Tranforms Model and attach some outcome.

Actually just use the Scale Model option of the Surface Toolbox module and increase the scale on XYZ and up to the maximum. Then check the resultant model, if it is sufficiently large, then proceed with conversion. If not, apply the scaling again.

Note that you are now arbitrarily scaling things, not sure if this is compatible with your end goal.

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 19, 2025, 6:25pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/17 "2025-12-19T18:25:16Z")

</div>

Hi Murat, thank you for your attention. Scaling sounds great, yet I am not sure how to “apply“ your idea. I found the corresponding toolbox, as atteched in the screenshots. However, I have no clue hoy to perform the scalinging. Can you help me out, please?

 ![Screen Shot 2025-12-19 at 12.20.15](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/e/dec7496efb7c1426577d987fa6c3a389ba3709f2.jpeg)

 ![Screen Shot 2025-12-19 at 12.14.47](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/d/4d091d17188826f6827664148ac3ec677f8b8d1e.jpeg)

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 19, 2025, 6:31pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/18 "2025-12-19T18:31:26Z")

</div>

My end goal is to collect section images of this 3D object (hollow cylinder), where the surface projects as concentric circles. I am looking forward to compare these image stack with a CT tomography (DICOM image stack) and possibly use some design imformation on the iterative reconstruction task. The real cylinder is a metal one and causes beam hardening.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [December 19, 2025, 6:53pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/19 "2025-12-19T18:53:26Z")

</div>

> [@Verena](#):
>
> . I found the corresponding toolbox, as atteched in the screenshots. However, I have no clue hoy to perform the scalinging. Can you help me out, please?

to accomplish what you need to do, you need to get familiar with Slicer’s UI and how these types of modules are set to work. I think you should begin with Slicer’s official documentation

> **[Welcome to 3D Slicer’s documentation! — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/)**

and then specifically see the section on Surface Toolbox.

---

<div class="post-metadata">

**Author:** ![Verena](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@Verena](https://discourse.slicer.org/u/Verena)\
**Post date:** [December 19, 2025, 7:38pm UTC](https://discourse.slicer.org/t/process-to-import-an-stl-file-and-convert-export-a-series-of-dicom-files/9906/20 "2025-12-19T19:38:26Z")

</div>

Yes, now I unterstand my operational error of the UI. Thank you!

 ![Screen Shot 2025-12-19 at 13.32.43](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/d/eddc10eb659a89c3a6299ee9f0c7dd73fd6a29c7.png)
