Skip to main content

Read Carl Zeiss Image (CZI) files

Project description

Czifile is a Python library to read Carl Zeiss Image (CZI) files, the native file format of the ZEN software by Carl Zeiss Microscopy GmbH. CZI files contain multidimensional images and metadata from microscopy experiments.

Author:

Christoph Gohlke

License:

BSD 3-Clause

Version:

2019.7.2.1

Requirements

Revisions

2019.7.2.1

  • Fix broken and deprecated imports.

  • Update copyright and package metadata.

2019.7.2

  • Require tifffile 2019.7.2.

2019.6.18

  • Add package main function to view CZI files.

  • Fix BGR to RGB conversion.

  • Fix czi2tif conversion on Python 2.

2019.5.22

  • Fix czi2tif conversion when CZI metadata contain non-ASCII characters.

  • Use imagecodecs_lite as a fallback for imagecodecs.

  • Make CziFile.metadata a function (breaking).

  • Make scipy an optional dependency; fallback on ndimage or fail on zoom().

2019.1.26

  • Fix czi2tif console script.

  • Update copyright year.

2018.10.18

  • Rename zisraw package to czifile.

2018.8.29

  • Move czifile.py and related modules into zisraw package.

  • Move usage examples to main docstring.

  • Require imagecodecs package for decoding JpegXrFile, JpgFile, and LZW.

2018.6.18

  • Save CZI metadata to TIFF description in czi2tif.

  • Fix AttributeError using max_workers=1.

  • Make Segment.SID and DimensionEntryDV1.dimension str types.

  • Return metadata as XML unicode string or dict, not etree.

  • Return timestamps, focus positions, events, and luts as tuple or ndarray

2017.7.21

  • Use multi-threading in CziFile.asarray to decode and copy segment data.

  • Always convert BGR to RGB. Remove bgr2rgb options.

  • Decode JpegXR directly from byte arrays.

2017.7.13

  • Add function to convert CZI file to memory-mappable TIFF file.

2017.7.11

  • Add ‘out’ parameter to CziFile.asarray.

  • Remove memmap option from CziFile.asarray (breaking).

  • Change spline interpolation order to 0 (breaking).

  • Make axes return a string.

  • Require tifffile 2017.7.11.

2014.10.10

  • Read data into a memory mapped array (optional).

2013.12.4

  • Decode JpegXrFile and JpgFile via _czifle extension module.

  • Attempt to reconstruct tiled mosaic images.

2013.11.20

  • Initial release.

Notes

The API is not stable yet and might change between revisions.

Python 2.7 and 3.4 are deprecated.

“ZEISS” and “Carl Zeiss” are registered trademarks of Carl Zeiss AG.

The ZISRAW file format design specification [1] is confidential and the license agreement does not permit to write data into CZI files.

Only a subset of the 2016 specification is implemented. Specifically, multifile images, image pyramids, and topography images are not yet supported.

Tested on Windows with a few example files only.

Czifile relies on the imagecodecs package for decoding LZW, JPEG, and JPEG XR compressed images. Alternatively, the imagecodecs_lite package can be used for decoding LZW compressed images.

Other libraries for reading CZI files (all GPL licensed):

References

  1. ZISRAW (CZI) File Format Design Specification Release Version 1.2.2. CZI 07-2016/CZI-DOC ZEN 2.3/DS_ZISRAW-FileFormat.pdf (confidential). Documentation can be requested at https://www.zeiss.com/microscopy/us/products/microscope-software/zen/czi.html

Examples

Read image data from a CZI file as numpy array:

>>> image = imread('test.czi')
>>> image.shape
(3, 3, 3, 250, 200, 3)
>>> image[0, 0, 0, 0, 0]
array([10, 10, 10], dtype=uint8)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

czifile-2019.7.2.1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distributions

czifile-2019.7.2.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

czifile-2019.7.2.1-py2-none-any.whl (18.4 kB view details)

Uploaded Python 2

File details

Details for the file czifile-2019.7.2.1.tar.gz.

File metadata

  • Download URL: czifile-2019.7.2.1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for czifile-2019.7.2.1.tar.gz
Algorithm Hash digest
SHA256 6169aa681dd8af0d25e8e731e83393140cb960097d2a641dd145e8349bd2e965
MD5 fd06c7c4f25275ba4356df40e103cf51
BLAKE2b-256 dd7973dcbdc3e16f6a828cf7c7b65aaa0bd5f6186f5a41a6d35281fc98e11ed4

See more details on using hashes here.

File details

Details for the file czifile-2019.7.2.1-py3-none-any.whl.

File metadata

  • Download URL: czifile-2019.7.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for czifile-2019.7.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41906b5bcce27d089c1c54f366f4f52e93b262d7d8d157622418f096a23b89a1
MD5 6090c31b33bdde26913755180c2bd07e
BLAKE2b-256 a2f906355f96114eda12b01dcdc462b8ef6d8458bb0b015c52909310ef65ce89

See more details on using hashes here.

File details

Details for the file czifile-2019.7.2.1-py2-none-any.whl.

File metadata

  • Download URL: czifile-2019.7.2.1-py2-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for czifile-2019.7.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 f75a3787896befcb0fd415c8cb9acea1f64007b05e264a6581c99b767758198c
MD5 cde72e3a33f802c0ae960de1b53655b1
BLAKE2b-256 ccaa63b6d955d56ea0209919658dbc89328b8876b3082dcf5f7c040a7b69a0d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page