Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Compression 4 is not supported #6

@arogozhnikov

Description

@arogozhnikov

(I am new to this data format, so blindly trying to iterate over continuous chunks of data). Using latest czifile:

import czifile
f = czifile.CziFile('/Users/axelr/Downloads/Brightfield+RAC/2019_02_19__11_16__SL000768.czi')
for block in f.subblocks():
    print(block.shape)
    print(block.compression)
    print(block.data())
    break

Result:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-6-a57de3b0f14e> in <module>
      6     print(block.shape)
      7     print(block.compression)
----> 8     print(block.data())
      9     break

~/system1/envs/pipeline/lib/python3.7/site-packages/czifile/czifile.py in data(self, raw, resize, order)
    615                 fh.seek(self.data_offset)
    616                 data = fh.read(self.data_size)
--> 617             data = DECOMPRESS[de.compression](data)
    618             if de.compression == 2:
    619                 # LZW

KeyError: 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions