I'm reading CZI images with the first code block, successfully. I want to read xx.czi.gz with the second code block, but failed. How can I read 'czi.gz' in to an array?
Thanks a lot!
from czifile import CziFile
import gzip
fname='xxx.czi'
with CziFile(fname) as czi:
image_arrays = czi.asarray()
fname2='xxx.czi.gz'
with gzip.open(fname2, 'rb') as f:
with CziFile(f) as czi:
image_arrays = czi.asarray()