# ITK read multi-frame DCM files

**URL:** https://discourse.itk.org/t/itk-read-multi-frame-dcm-files/5444
**Category:** Beginner Questions
**Tags:** dicom
**Created:** [October 25, 2022, 2:28pm UTC](https://discourse.itk.org/t/itk-read-multi-frame-dcm-files/5444 "2022-10-25T14:28:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![itkk](https://discourse.itk.org/letter_avatar_proxy/v4/letter/i/5fc32e/32.png) [@itkk](https://discourse.itk.org/u/itkk)
#### Post date: [October 25, 2022, 2:28pm UTC](https://discourse.itk.org/t/itk-read-multi-frame-dcm-files/5444/1 "2022-10-25T14:28:25Z")

</div>

Can ITK read multi-frame DCM files? For example, DSA, how to do it?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [October 25, 2022, 2:31pm UTC](https://discourse.itk.org/t/itk-read-multi-frame-dcm-files/5444/2 "2022-10-25T14:31:54Z")

</div>

ITK can read multi-frame DICOM files. It is easier than [reading a regular DICOM series](https://examples.itk.org/src/io/gdcm/readdicomseriesandwrite3dimage/documentation). Just provide a filename which ends in `.dcm`. Any [read image](https://examples.itk.org/src/io/imagebase/readanimage/documentation) example should do.

---

<div class="post-metadata">

### Author: ![itkk](https://discourse.itk.org/letter_avatar_proxy/v4/letter/i/5fc32e/32.png) [@itkk](https://discourse.itk.org/u/itkk)
#### Post date: [October 25, 2022, 3:01pm UTC](https://discourse.itk.org/t/itk-read-multi-frame-dcm-files/5444/3 "2022-10-25T15:01:59Z")

</div>

Thanks, I use the C++ version of the code.

ImageType::Pointer image = itk::ReadImage(argv[1]);

Does image pointer point to all frame data? How can I get the frame data from the first frame to the last frame separately by this pointer?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [October 25, 2022, 4:16pm UTC](https://discourse.itk.org/t/itk-read-multi-frame-dcm-files/5444/4 "2022-10-25T16:16:17Z")

</div>

The slices are ordered along k (usually z) coordinate. Here is an [example](https://examples.itk.org/src/filtering/imagegrid/processa2dsliceofa3dimage/documentation) which works on one slice.
