aicsimageio icon indicating copy to clipboard operation
aicsimageio copied to clipboard

Multi-scene Tiff image Size Y is returned as square(Size Y)

Open Aerendel opened this issue 6 years ago • 0 comments

System and Software

  • aicsimageio Version: 3.3.0
  • Python Version: 3.6, 3.7
  • Operating System: Ubuntu

Description

Running into a case where the Y size on a Tiff file is being erroneously shown as being the square of the Y size. This manifests when using the following accessors (as far as I've tested):

  • AICSImage.size(),
  • AICSImage.shape
  • TiffReader.size()

Troubleshooting steps show a discrepancy between the shape of the AICSImage.data array versus AICSImage.dask_data array as seen in this snippet:

>>> img = aicsimageio.AICSImage("3500002602_Scan_12-7-2018-9-49-54-AM_Well_F11_Ch1_-1um.tiff")
>>> img.dask_data.shape
(3, 1, 1, 1, 56972304, 7548)
>>> img.data.shape
(3, 1, 1, 1, 7548, 7548)
>>> img.size("XY")
(7548, 56972304)

Expected Behavior

Size Y should be correct all the time.

Reproduction

Download the file in question from https://aicsbitbucket.corp.alleninstitute.org/projects/SW/repos/fov-synthesis/browse/fov_synthesis/tests/resources/3500002602_Scan_12-7-2018-9-49-54-AM_Well_F11_Ch1_-1um.tiff Run this code to reproduce issue:

>>> img = aicsimageio.AICSImage("3500002602_Scan_12-7-2018-9-49-54-AM_Well_F11_Ch1_-1um.tiff")
>>> img.dask_data.shape
(3, 1, 1, 1, 56972304, 7548)
>>> img.data.shape
(3, 1, 1, 1, 7548, 7548)
>>> img.size("XY")
(7548, 56972304)

Environment

Any additional information about your environment

Aerendel avatar Sep 18 '20 23:09 Aerendel