# Read a multi-frames DICOM dataset with VTK

**URL:** https://discourse.vtk.org/t/read-a-multi-frames-dicom-dataset-with-vtk/2777
**Category:** Support
**Tags:** file-formats
**Created:** [March 9, 2020, 12:31pm UTC](https://discourse.vtk.org/t/read-a-multi-frames-dicom-dataset-with-vtk/2777 "2020-03-09T12:31:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![RomyM](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@RomyM](https://discourse.vtk.org/u/RomyM)
#### Post date: [March 9, 2020, 12:31pm UTC](https://discourse.vtk.org/t/read-a-multi-frames-dicom-dataset-with-vtk/2777/1 "2020-03-09T12:31:40Z")

</div>

Hello,

With vtkDICOMImageReader() I tried to read a single 3D DICOM file. Unfortunately, this reader does not handle multi-frames DICOM datasets (as documented [https://vtk.org/doc/nightly/html/classvtkDICOMImageReader.html#details](https://vtk.org/doc/nightly/html/classvtkDICOMImageReader.html#details)), which I think I have. How can I read a multi-frames DICOM dataset with VTK?

This don’t gives an error code, but when rendering, also don’t give an output visualization.  
import vtk

dir = “soure to directory”  
reader = vtk.vtkDICOMImageReader()  
reader.SetDirectoryName(dir)  
reader.Update()

Thank you,

Romy

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 9, 2020, 1:48pm UTC](https://discourse.vtk.org/t/read-a-multi-frames-dicom-dataset-with-vtk/2777/2 "2020-03-09T13:48:20Z")

</div>

@dgobbi’s [vtk-dicom](https://github.com/dgobbi/vtk-dicom/) module should be able to read these images.

It would probably make sense to deprecate VTK’s built-in DICOM reader and instead enable vtk-dicom module by default.

---

<div class="post-metadata">

### Author: ![RomyM](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@RomyM](https://discourse.vtk.org/u/RomyM)
#### Post date: [March 9, 2020, 2:10pm UTC](https://discourse.vtk.org/t/read-a-multi-frames-dicom-dataset-with-vtk/2777/3 "2020-03-09T14:10:13Z")

</div>

Thank you.

As I forgot to mention, I want to code in Python instead of c++. Is this also possible with the vtk-dicom or another reader?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 9, 2020, 2:53pm UTC](https://discourse.vtk.org/t/read-a-multi-frames-dicom-dataset-with-vtk/2777/4 "2020-03-09T14:53:21Z")

</div>

vtk-dicom provides Python wrapping, but I don’t now if it is available on the Python Package Index or elsewhere.

If you work with medical imaging in Python then I would recommend to consider using a Python environment built specifically for this, such as 3D Slicer. It has lots of DICOM import/export tools, not just for images but for segmentation, registration, structured reports, RT objects, etc., lots of visualization and processing options, etc. You can run any Python scripts as in a generic Python environment and you can install all packages from the Python Package, but you also get lots of additional features.
