# Simple ITK ImageStacks Error

**URL:** https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106
**Category:** Support
**Tags:** python
**Created:** [October 11, 2021, 8:14pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106 "2021-10-11T20:14:02Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Rosalee\_Elting](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rosalee_elting/32/10138_2.png) [@Rosalee\_Elting](https://discourse.slicer.org/u/Rosalee_Elting)
#### Post date: [October 11, 2021, 8:14pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/1 "2021-10-11T20:14:02Z")

</div>

Os: Windows 10 Pro  
Slicer version: 4.11.20210226  
All extensions updated.

I am trying to load CT data slices using ImageStacks. I get the following error when I try any slices, and when I try to generate a preview and full resolution.

Loading failed: Exception thrown in SimpleITK ImageFileReader\_Execute: D:\D\S\Slicer-1-build\ITK\Modules\IO\TIFF\src\itkTIFFImageIO.cxx:1408:  
itk::ERROR: itk::ERROR: TIFFImageIO(00000209510E01C0): Problem reading the row: 941

Slice error number does change based on which slice axis I try to load (X, Y or Z)

Thank you for any help!

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [October 11, 2021, 10:53pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/2 "2021-10-11T22:53:41Z")

</div>

That looks like a read error that would come from corrupted data. Are the files readable with other applications? If you can read them in another app, maybe try re-saving them and trying those in Slicer. If you find a version that works elsewhere but not in Slicer please share an example for debugging.

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [October 11, 2021, 11:16pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/3 "2021-10-11T23:16:27Z")

</div>

@Rosalee_Elting if you can share the data, we can try to replicate the error.

And I am not also sure what you mean by

> [@Rosalee\_Elting](#):
>
> Slice error number does change based on which slice axis I try to load (X, Y or Z)

You should have just one sequence of slices…

---

<div class="post-metadata">

### Author: ![Rosalee\_Elting](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rosalee_elting/32/10138_2.png) [@Rosalee\_Elting](https://discourse.slicer.org/u/Rosalee_Elting)
#### Post date: [October 12, 2021, 4:02pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/4 "2021-10-12T16:02:08Z")

</div>

Hi @muratmaga and @pieper , thank you for the help! I’ve attached a link to a zipped file of the slices. When the person CT scanning our birds includes the slices, they have a X, Y and Z slices files. I’ve historically been able to load the X slices (of other birds) in ImageStacks, but now wonder if I’m missing something. Hopefully you can look at the data and see. Thanks, again! [download link](https://drive.google.com/file/d/1bYcSYtL_vdxjFTbywM181wq-vg13n_kT/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [October 12, 2021, 5:59pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/5 "2021-10-12T17:59:42Z")

</div>

Hi @Rosalee_Elting - I tried downloading the google drive link but the zip file is invalid somehow. Can you confirm the zipfile is valid on your end and maybe try re-uploading? The issue may be due to the size of the zipfile so maybe you can see if you can replicate the issue with just one or two images?

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [October 12, 2021, 6:32pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/6 "2021-10-12T18:32:27Z")

</div>

> [@Rosalee\_Elting](#):
>
> Hi @muratmaga and @pieper , thank you for the help! I’ve attached a link to a zipped file of the slices. When the person CT scanning our birds includes the slices, they have a X, Y and Z slices files. I’ve historically been able to load the X slices (of other birds) in ImageStacks, but now wonder if I’m missing something. Hopefully you can look at the data and see. Thanks, again! [download link](https://drive.google.com/file/d/1bYcSYtL_vdxjFTbywM181wq-vg13n_kT/view?usp=sharing)

I donwnloaded and unzipped and used the X-slices folder, didn’t encounter any issues either loading the preview or full resolution dataset. There are many datasets in the zip file, is there a particular one you are facing the issue with?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/2/62714db455e1c1cf3f3c0e7048b6ab29bb932865.jpeg)

---

<div class="post-metadata">

### Author: ![Rosalee\_Elting](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rosalee_elting/32/10138_2.png) [@Rosalee\_Elting](https://discourse.slicer.org/u/Rosalee_Elting)
#### Post date: [October 12, 2021, 10:41pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/7 "2021-10-12T22:41:53Z")

</div>

Hi @muratmaga ! Looks great! This scan was taken with a 16.2um slice distance, I’m wondering if my changing the auto-populated values (0.264…mm) is where the error generated from. Coincidental or related, do you think?

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [October 12, 2021, 10:50pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/8 "2021-10-12T22:50:54Z")

</div>

You can manually update the voxel spacing at the ImageStacks. I simply used whatever the value tiff files reported (hence another reason not to use 2D formats like that).

Slice spacing shouldn’t cause an issue like that. Perhaps as @pieper indicated one of your files were corrupted, thought I don’t know why you got that with other datasets. All I can say that ImageStacks working correctly with this dataset using the stable version of slicer.

---

<div class="post-metadata">

### Author: ![Rosalee\_Elting](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rosalee_elting/32/10138_2.png) [@Rosalee\_Elting](https://discourse.slicer.org/u/Rosalee_Elting)
#### Post date: [October 14, 2021, 3:48pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/9 "2021-10-14T15:48:04Z")

</div>

Thank you for looking into it! I will check the files for corruption (they were transferred in a strange way, so that could be it). I appreciate you trying it on your machine and narrowing down the issue and that it isn’t ImageStacks. Can you direct me to a forum for preferred formats (non-tiff)? Thank you!

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [October 14, 2021, 4:53pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/10 "2021-10-14T16:53:51Z")

</div>

If the imaging lab gave you this, you will have to import it through the ImageStack, and when you are importing make sure you enter the correct voxel spacing values. After a successful import, you should save the resultant volume as NRRD so that you don’t have to keep importing and fixing the voxel spacing, everytime you want to work with this dataset.

There are a few other volumetric dataset options, but NRRD is the most flexible and supported by other open source biomedical visualization programs, so thats what we suggest.

---

<div class="post-metadata">

### Author: ![Rosalee\_Elting](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rosalee_elting/32/10138_2.png) [@Rosalee\_Elting](https://discourse.slicer.org/u/Rosalee_Elting)
#### Post date: [October 14, 2021, 5:44pm UTC](https://discourse.slicer.org/t/simple-itk-imagestacks-error/20106/11 "2021-10-14T17:44:36Z")

</div>

Hi Murat,

Great! That is super helpful. I usually save the scene and only load the slices once to prevent mis-loading with the wrong voxels or other slice issues.

Thank you for the clarification!
