# Uncompress failed when reading image via sitk.ReadImage

**URL:** https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613
**Category:** Algorithms
**Tags:** simpleitk
**Created:** [February 20, 2019, 4:19pm UTC](https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613 "2019-02-20T16:19:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sedghi](https://discourse.itk.org/user_avatar/discourse.itk.org/sedghi/32/317_2.png) [@sedghi](https://discourse.itk.org/u/sedghi)
#### Post date: [February 20, 2019, 4:19pm UTC](https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613/1 "2019-02-20T16:19:04Z")

</div>

I’m trying to read an image that I downloaded from RIRE website with `sitk.ReadImage()` but I get “Uncompress failed” message and the resulting image intensity values looks wrong.

I have also tried loading the image inside 3D slicer, but it is not able to show it correctly too.

The images came in .tar.gz format and I extracted them in Ubuntu to get the mhd + bin files.

I have put both the compressed and uncompressed files in the following link in my dropbox

> **[sitk](https://www.dropbox.com/sh/6eslm9c6pmq47al/AAAEP8aCpyZ0Yu3HM__pO5lJa?dl=0)**
>
> Shared with Dropbox

SimpleITK notebook uses RIRE data set for many of the tutorials but some of the RIRE data (patient 109, attached in the link) looks wrong.

I appreciate any help  
Thank you

---

<div class="post-metadata">

### Author: ![mihail.isakov](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@mihail.isakov](https://discourse.itk.org/u/mihail.isakov)
#### Post date: [February 20, 2019, 6:22pm UTC](https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613/2 "2019-02-20T18:22:22Z")

</div>

You can extract .bin.Z (header points to .bin)

[https://drive.google.com/file/d/15XsWVI8opRlMUxBKV5MBmvw4eCtk-zEI/view?usp=sharing](https://drive.google.com/file/d/15XsWVI8opRlMUxBKV5MBmvw4eCtk-zEI/view?usp=sharing)

Sincerely

---

<div class="post-metadata">

### Author: ![sedghi](https://discourse.itk.org/user_avatar/discourse.itk.org/sedghi/32/317_2.png) [@sedghi](https://discourse.itk.org/u/sedghi)
#### Post date: [February 20, 2019, 6:39pm UTC](https://discourse.itk.org/t/uncompress-failed-when-reading-image-via-sitk-readimage/1613/3 "2019-02-20T18:39:57Z")

</div>

Thank you  
It was the solution
