AllenCellModeling / aicspylibczi

Python module utilizing libCZI for reading Zeiss CZI files.
https://allencellmodeling.github.io/aicspylibczi
GNU General Public License v3.0
36 stars 8 forks source link

Fix/crash when no subblocks #97

Closed toloudis closed 2 years ago

toloudis commented 2 years ago

AICS has some old files which apparently have metadata but no subblocks. It is thought that they were container files with expected pixel data in associated additional files, but they have now become isolated and it's ~impossible to recover the pixel data. The goal is to still be able to get metadata out.

The code change here prevents aicspylibczi from crashing on such files, and also prevents an exception from being raised due to the PixelType = Invalid. These code changes only affect attempting to first open the file and collect dimension info and metadata.

There needs to be an accompanying change in aicsimageio's czi_reader to complete this support.

codecov-commenter commented 2 years ago

Codecov Report

Merging #97 (dbd7398) into main (f74d636) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #97   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files           3        3           
  Lines         148      148           
=======================================
  Hits          146      146           
  Misses          2        2           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f74d636...dbd7398. Read the comment docs.