Skip to main content

Read Carl Zeiss(r) Image (CZI) files

Project description

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

Author:

Christoph Gohlke

Organization:

Laboratory for Fluorescence Dynamics. University of California, Irvine

Version:

2018.10.18

Requirements

Revisions

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 (backwards incompatible). Change spline interpolation order to 0 (backwards incompatible). 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 licence 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.

Other libraries for reading CZI files (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-2018.10.18.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

czifile-2018.10.18-py2.py3-none-any.whl (16.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: czifile-2018.10.18.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for czifile-2018.10.18.tar.gz
Algorithm Hash digest
SHA256 ec5078897170fea3d267f6e00c64e200ec90519ea46973732235e2d958daabd8
MD5 839468b2ed251658e83266773cecd807
BLAKE2b-256 3aa1ab4775d9f68fd113c241c95a1d19f76fbebafd9e9f45fe2b6220fb7b2bab

See more details on using hashes here.

File details

Details for the file czifile-2018.10.18-py2.py3-none-any.whl.

File metadata

  • Download URL: czifile-2018.10.18-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for czifile-2018.10.18-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 07c0abf745f9d0773a6db831c8d3025afecda59a031c3b697084876e28c1d6e8
MD5 4ceddcef17007ae05c55b196389fa374
BLAKE2b-256 d5f7191a4f0a7d06877b12b65d7fcb0646fc8248868c47cfd410da5843c30322

See more details on using hashes here.

Supported by

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