# Facing Problems while working with AICSImage package for CZI files

**URL:** <https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690>\
**Category:** Other Discussions\
**Tags:** aiscimageio\
**Created:** [March 11, 2024, 4:19pm UTC](https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690 "2024-03-11T16:19:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnadeem57](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dnadeem57](https://forum.allencell.org/u/dnadeem57)\
**Post date:** [March 11, 2024, 4:19pm UTC](https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690/1 "2024-03-11T16:19:38Z")

</div>

Hi All,

I am working with LLSM movies as CZI files. The movies have 3 channels and are pretty large so I am using delayed image reading from the AICSImage package. The code is as follows.

I am trying to access one time point and one channel at a time. The code works perfectly with channel 2 but sort of disrupts the movie for channel 1 and 3. I have attached screenshots of the actual movie in czi format and the movie in ome.tiff format in fiji.

It also displays the dimensiosn for channel 2 and channel 1 and 3 as being different

when i run the code img.dims I get  
\<Dimensions [T: 130, C: 3, Z: 116, Y: 2052, X: 340]\>

However when I run the code  
lazy\_t0 = img.get\_image\_dask\_data(“CZYX”, T=1,C=2)  
t0 = lazy\_t0.compute()  
t0.shape  
I get Z: 114, Y:2048, X:337 (this happens only for channel 1 and 3)

The complete code is here

lazy\_t0 = img.get\_image\_dask\_data(“ZYX”, T=1,C=2)  
lazy\_t0.shape  
t0 = lazy\_t0.compute()  
t0.shape

# Save the array as OME-TIFF

with tifffile.TiffWriter(output\_tiff\_file\_path, bigtiff=False) as tif:  
tif.write(t0, photometric=‘minisblack’, metadata={‘axes’: ‘ZYX’})

 ![Screenshot 2024-03-07 at 1.38.15 PM](https://canada1.discourse-cdn.com/flex027/uploads/allencell/original/1X/6357318b0863797ef6188be307997249421da627.png)  
 ![Screenshot 2024-03-07 at 1.39.01 PM](https://canada1.discourse-cdn.com/flex027/uploads/allencell/original/1X/4c98a8b010fc928d15e9a61862a95f6f8522c8b3.png)

---

<div class="post-metadata">

**Author:** ![danielt](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@danielt](https://forum.allencell.org/u/danielt)\
**Post date:** [March 12, 2024, 3:23pm UTC](https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690/2 "2024-03-12T15:23:20Z")

</div>

Hello @dnadeem57 and thanks for the question.  
In the future please put questions about aicsimageio or bioio in the image.sc forum instead as that is our preferred and primary support forum.

If there is any way you are able to share the image then we would be able to debug this on our end to understand exactly what’s happening. You can contact me directly or also post it as an issue in aicsimageio’s github.

My best guess is that it might be newer CZI data or is stored in a way which our czi reader library is not yet supporting. The code you pasted here looks ok.

---

<div class="post-metadata">

**Author:** ![dnadeem57](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dnadeem57](https://forum.allencell.org/u/dnadeem57)\
**Post date:** [March 12, 2024, 8:19pm UTC](https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690/3 "2024-03-12T20:19:55Z")

</div>

Hi @danielt,  
Thanks for responding. I can share the data with you. Can you give me an email where I can share the link to the dataset?

---

<div class="post-metadata">

**Author:** ![danielt](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@danielt](https://forum.allencell.org/u/danielt)\
**Post date:** [March 12, 2024, 8:23pm UTC](https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690/4 "2024-03-12T20:23:19Z")

</div>

I sent a dm with email address or you can just reply to the DM alternately.

---

<div class="post-metadata">

**Author:** ![cells](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@cells](https://forum.allencell.org/u/cells)\
**Post date:** [April 11, 2024, 5:16pm UTC](https://forum.allencell.org/t/facing-problems-while-working-with-aicsimage-package-for-czi-files/690/5 "2024-04-11T17:16:35Z")

</div>

Hi @dnadeem57,

I saw that you actually had posted on image.sc forum prior to posting here. Somehow we missed your post there - I’m sorry! I’ll double check our notification system.

Hope your issue has been resolved.
