AllenCellModeling/aicspylibczi

Problems with czi.size = (-1, -1, -1, -1, -1, -1) for multi-scence CZI

sebi06 opened this issue · 2 comments

Hi all,

I just tries to read a multi-scene CZI an discovered some strange behavior. The output basically is:

------------------   Show Metainformation ------------------
Array Shape (czifile)          :  (1, 2, 1, 30448, 37770, 3)
Dimension Entry (czifile)      :  BSCYX0
Array Shape (aicsimageio)      :  (1, 1, 1, 1, 1200, 1600)
Dimension Entry (aicsimageio)  :  STCZYX
------------------------------------------------------------
SizeS :  2
SizeT :  1
SizeZ :  1
SizeC :  1
SizeX (czifile) :  37770
SizeY (czifile) :  30448
SizeY (aicsimageio) :  1600
SizeY (aicsimageio) :  1200
CZI Dimensions :  [{'X': (0, 1600), 'Y': (0, 1200), 'C': (0, 1), 'M': (0, 294), 'S': (0, 1), 'B': (0, 1)}, {'X': (0, 1600), 'Y': (0, 1200), 'C': (0, 1), 'M': (0, 239), 'S': (1, 2), 'B': (0, 1)}]
CZI DimeString :  BSCMYX
CZI Size       :  (-1, -1, -1, -1, -1, -1)
CZI IsMosaic   :  True
CZI Scene Shape consitent :  False

So what I do not understand is: czi.size = (-1, -1, -1, -1, -1, -1)

And when I read the image it looks like this:

image

So size returns a list of -1's when the scene shapes are inconsistent. size is there for when everything is consistent but if it's not then have a look at dims_shape(), it should give you a list of dictionaries showing the size of each Scene.

OK, good to know. Makes sense.