# How to read resting state fMRI image using SimpleITK?

**URL:** https://discourse.itk.org/t/how-to-read-resting-state-fmri-image-using-simpleitk/6209
**Category:** Beginner Questions
**Tags:** python, simpleitk
**Created:** [September 15, 2023, 7:47am UTC](https://discourse.itk.org/t/how-to-read-resting-state-fmri-image-using-simpleitk/6209 "2023-09-15T07:47:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![debapriya](https://discourse.itk.org/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@debapriya](https://discourse.itk.org/u/debapriya)
#### Post date: [September 15, 2023, 7:47am UTC](https://discourse.itk.org/t/how-to-read-resting-state-fmri-image-using-simpleitk/6209/1 "2023-09-15T07:47:09Z")

</div>

I have a fMRI image of size 64,64,39,192. It is in nii.gz format. What is the process to read this image in SimpleITK? sitk.ReadImage is showing the following error.

```auto
TypeError: Invalid shape (39, 64, 64) for image data

```
