# Stl saving as DICOM (standard compliant)

**URL:** <https://discourse.slicer.org/t/stl-saving-as-dicom-standard-compliant/25711>\
**Category:** Support\
**Created:** [October 14, 2022, 11:02pm UTC](https://discourse.slicer.org/t/stl-saving-as-dicom-standard-compliant/25711 "2022-10-14T23:02:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [October 14, 2022, 11:02pm UTC](https://discourse.slicer.org/t/stl-saving-as-dicom-standard-compliant/25711/1 "2022-10-14T23:02:42Z")

</div>

[This](https://support.dcmtk.org/docs/stl2dcm.html) command line tool allows to save a stl as DICOM.

Regarding [BRP](https://github.com/SlicerIGT/SlicerBoneReconstructionPlanner#readme) would it be important to export custom surgical guides, reconstruction or anatomical models on the Slicer scene not as stl but as DICOM?

I found this [old presentation](https://dicom.nema.org/Dicom/News/September2017/docs/sups/sup205_overview.pdf) regarding this topic.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 14, 2022, 11:21pm UTC](https://discourse.slicer.org/t/stl-saving-as-dicom-standard-compliant/25711/2 "2022-10-14T23:21:04Z")

</div>

Yes, since encapsulated stl is part of the dicom standard it would be a good way to record the needed metadata about a model and store it in a hosptial pacs or vna. It also removes a lot of the ambiguity about coordinate systems and units that are problematic with native stl.

That said, it’s a somewhat obscure format so it’s not clear who else in the world would support that format.

---

<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:** [October 16, 2022, 6:33am UTC](https://discourse.slicer.org/t/stl-saving-as-dicom-standard-compliant/25711/3 "2022-10-16T06:33:21Z")

</div>

It would be straightforward to implement a DICOM export plugin based on DCMTK’s [stl2dcm example](https://github.com/DCMTK/dcmtk/blob/master/dcmdata/apps/stl2dcm.cc). However, I agree with @pieper in that this is a niche file format, therefore it is not clear if it is worth the effort of implementing and maintaining importers/exporters for it. I don’t think anyone form the Slicer developer team has ever seen such a DICOM file. It is also telling that DCMTK does not have a dcm2stl utility - most likely because people don’t come across such files.

Note that segmentations can also be stored in a mesh format, see: [A.57&nbsp;Surface Segmentation IOD](https://dicom.nema.org/dicom/2013/output/chtml/part03/sect_A.57.html). It is a bit more general-purpose representation (not so tightly linked to 3D printing as the encapsulated STL), but it has not become widely used either. I only remember this single discussion on this forum about this information object: [Load DICOM Surface Segmentation Objects](https://discourse.slicer.org/t/load-dicom-surface-segmentation-objects/1125)

If you just need to store encapsulated data files on a PACS in DICOM format then you may also consider Slicer’s embedded MRML scene format (read/written by the “Slicer Data Bundle” plugin). It is not compatible with any other software, but it is already implemented and it works with all data objects that Slicer supports.
