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:
- Organization:
Laboratory for Fluorescence Dynamics. University of California, Irvine
- License:
3-clause BSD
- Version:
2019.6.18
Requirements
Imagecodecs 2019.5.22 (optional; used for decoding LZW, JPEG, and JPEG XR)
Revisions
- 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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file czifile-2019.6.18.tar.gz
.
File metadata
- Download URL: czifile-2019.6.18.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fa3a085f6ebead76649a2d3ef83cb66960c00449d27a624294096db95adad43 |
|
MD5 | 10712398ba0c18afc0672d9378578ffe |
|
BLAKE2b-256 | d2675f242b4f81b53d0abc1251662af369eb7f267d61ec967b468bf26e49bbef |
File details
Details for the file czifile-2019.6.18-py2.py3-none-any.whl
.
File metadata
- Download URL: czifile-2019.6.18-py2.py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed90944fc0b99f6703a33fe997b1d2ee5d6d6f0731331cdc99178acff008887 |
|
MD5 | 1606eaf57efa612f083f5ae4ff917e7c |
|
BLAKE2b-256 | 985d1cdd27c7780f6f69efe7481297f9ef2ddda8396de897effe4ffcd4995404 |