# VTK to DICOM using 3D slicer or python shell

**URL:** <https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639>\
**Category:** Support\
**Tags:** dicom, vtk\
**Created:** [May 20, 2020, 2:13pm UTC](https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639 "2020-05-20T14:13:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EkaitzEsteban87](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ekaitzesteban87/32/7141_2.png) [@EkaitzEsteban87](https://discourse.slicer.org/u/EkaitzEsteban87)\
**Post date:** [May 20, 2020, 2:13pm UTC](https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639/1 "2020-05-20T14:13:36Z")

</div>

Hello,

I have a question about VTK to DICOM conversion. I have an surface mesh VTK file which can be read perfectly in paraview. I want to convert this VTK to DICOM using 3D Slicer. Is there any possibility to make this conversion using the 3Dslicer python shell…? If not, which are the steps for the conversion?

best regards,  
Ekaitz.

---

<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:** [May 20, 2020, 3:51pm UTC](https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639/2 "2020-05-20T15:51:32Z")

</div>

Yes, you can do this in Slicer using Python scripting. What DICOM object would you like to create? CT image, RT structure set, DICOM segmentation object? What is your clinical application?

---

<div class="post-metadata">

**Author:** ![EkaitzEsteban87](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ekaitzesteban87/32/7141_2.png) [@EkaitzEsteban87](https://discourse.slicer.org/u/EkaitzEsteban87)\
**Post date:** [June 16, 2020, 8:03pm UTC](https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639/3 "2020-06-16T20:03:03Z")

</div>

Dear Lasso,

Thank you for your fast reply. I guess that it is a DICOM segmentation object. It is not a clinical application… The most nearest example can be a bone that I want to check inside it.

Best regards,  
Ekaitz.

---

<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:** [June 16, 2020, 8:28pm UTC](https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639/4 "2020-06-16T20:28:42Z")

</div>

If it is not a clinical application then I would not recommend using DICOM, but any of the common mesh file formats.

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [April 1, 2022, 7:02am UTC](https://discourse.slicer.org/t/vtk-to-dicom-using-3d-slicer-or-python-shell/11639/5 "2022-04-01T07:02:50Z")

</div>

Hi lassoan, I have vtkImageData that I would like to convert to DICOM. I would like to create a CT image from it.

What possible ways are there to do that? Are there any libraries available in python for the same?  
Thanks for the help.
