# how to convert a dicom series into nifity image in memory with simpleitk?

**URL:** <https://discourse.itk.org/t/how-to-convert-a-dicom-series-into-nifity-image-in-memory-with-simpleitk/6146>\
**Category:** Uncategorized\
**Created:** [August 15, 2023, 12:56am UTC](https://discourse.itk.org/t/how-to-convert-a-dicom-series-into-nifity-image-in-memory-with-simpleitk/6146 "2023-08-15T00:56:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Li\_Bin](https://discourse.itk.org/user_avatar/discourse.itk.org/li_bin/32/3637_2.png) [@Li\_Bin](https://discourse.itk.org/u/Li_Bin)\
**Post date:** [August 15, 2023, 12:56am UTC](https://discourse.itk.org/t/how-to-convert-a-dicom-series-into-nifity-image-in-memory-with-simpleitk/6146/1 "2023-08-15T00:56:28Z")

</div>

Hi, there,  
I need to read a dicom series by network into bytes array and convert to a nifity image in memory . I see the samples which convert to nifty by save into disk by specifing the file extension .nii or .nii.gz. Is there any way to get a nifity image withtout bothering writing into file system?

thanks in advances.  
L,B

---

<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:** [August 15, 2023, 12:50pm UTC](https://discourse.itk.org/t/how-to-convert-a-dicom-series-into-nifity-image-in-memory-with-simpleitk/6146/2 "2023-08-15T12:50:29Z")

</div>

Hello @Li_Bin,

Please see [this notebook](https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks/blob/master/Python/03_Image_Details.ipynb) section titled **Reading from memory** for discussion and code.
