Python Script for reading CZI images

Hi all, I am playing around for a while now with all the nice options on how to read CZI images in Fiji using python scripting. What I got is not perfect, but works quite well in most cases.

So feel free to use it and even improve it or share feedback.

You find the script here:



Hi there, thanks for the contribution. Sorry, I haven’t had the chance to try your script yet, but I was wondering if you could add a comment on how your script differs and/or improves on Fiji’s capabilities with .czi files. I have been using Fiji to read and analyze .czi files for some time and find it rather satisfactory already, but perhaps your script provides features I don’t (yet) know I need?


for most things just using the very powerful BioFormats plugin suffienct and will do the job thanks to work of the BioFormats guys and the the good communication with our DevTeam at ZEISS.

The reason why I created this script has several reasons.

  • CZI image do have a pyramidal structure with different resolution levels. While it is possible to open them using BioFormats by choosing the correct image series, this is cumbersome to automate
  • the script allows you to directly specify the desired pyramid level to read
  • additional is sets the scaling for the pyramid level correctly, which did not work using the BioFormats plugin only (or I do not know how … :-))
  • the need to automate opening CZI in headless mode required to write some kind of script and not using method, because and BioFormats do not work in headless mode
  • see this post: Strange Issue with using BioFormats from python script in headless mode only
  • this headless things is really crucial to run our Docker containers on APEER (, where we use Fiji + BoFormats quite often to create image processing modules like this one: Measure 3D Objects

So basically it offers a bit more flexibility and allows automating reading CZIs via BioFormats by exposing all the options of BioFormats (and some additional minor things) and wrapping them inside a python script by using the cool scripting parameters, which makes life in headless mode and inside Docker containers easy.

Feel free to test it and let me know if it works or how it could be improved, since I am pretty sure my script still has some hidden “glitches” …

Sebi (from ZEISS)