# Is there a way to read a DICOM from bytes in memory

**URL:** https://discourse.itk.org/t/is-there-a-way-to-read-a-dicom-from-bytes-in-memory/5126
**Category:** Beginner Questions
**Created:** [June 22, 2022, 9:35pm UTC](https://discourse.itk.org/t/is-there-a-way-to-read-a-dicom-from-bytes-in-memory/5126 "2022-06-22T21:35:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ktdiedrich](https://discourse.itk.org/user_avatar/discourse.itk.org/ktdiedrich/32/2784_2.png) [@ktdiedrich](https://discourse.itk.org/u/ktdiedrich)
#### Post date: [June 22, 2022, 9:35pm UTC](https://discourse.itk.org/t/is-there-a-way-to-read-a-dicom-from-bytes-in-memory/5126/1 "2022-06-22T21:35:07Z")

</div>

Is there a way to read a DICOM from bytes in memory into a SimpleITK Image object? This is where the DICOM slice instances are each a binary memory blob. There is SimpleITK.GetImageFromArray(image\_volume) that can create a SimpleITK.SimpleITK.Image object once the DICOM blob has been processed into a volume by some other toolkit such as pynrrd. Though we still need to SetOrigin(…) and SetDirection(…)

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [June 23, 2022, 12:23pm UTC](https://discourse.itk.org/t/is-there-a-way-to-read-a-dicom-from-bytes-in-memory/5126/2 "2022-06-23T12:23:30Z")

</div>

Hello @ktdiedrich,

Short answer, no.

Same question [asked here](https://discourse.itk.org/t/how-to-create-itk-image-from-buffered-dicom-data/4895/2). Please see slightly more detailed discussion there with a potential workaround.
