Convert czi to OME-TIFF
Project description
czi2ometiff
czi2ometiff is a Python tool for converting Zeiss CZI microscopy files into OME-TIFF, a widely used open standard for bioimaging data.
It provides a simple, reliable interface for extracting image data, channel names, and pixel sizes from CZI files and exporting them into high-quality OME-TIFF files.
Features
- Easy to use — convert a CZI file to OME-TIFF with a single function call.
- Automatic metadata extraction:
- Channel names (from CZI metadata if available)
- Pixel sizes in X, Y, and Z (converted to micrometers)
- Flexible output — works with multi-channel and multi-Z images.
- OME-TIFF pyramids — optional downsampled pyramid levels for fast viewing in tools like QuPath, OMERO, and napari.
- Built on numpy2ometiff — leverages robust OME-TIFF writing from the
numpy2ometifflibrary.
Installation
Install directly via pip:
pip install czi2ometiff
Example Usage
from czi2ometiff import convert_czi_to_ometiff
# Input CZI file
input_file = "example_image.czi"
# Optional: specify output path
output_file = "example_image.ome.tiff"
# Convert to OME-TIFF
output_path = convert_czi_to_ometiff(
input_path=input_file,
output_path=output_file, # Optional—defaults to input filename with .ome.tiff
downsample_count=8 # Number of pyramid levels
)
print("Saved OME-TIFF:", output_path)
How It Works
czi2ometiff automatically:
- Reads the CZI file using
czifile - Extracts image data as a NumPy array
- Detects channel names from CZI metadata
- Extracts pixel sizes (stored in meters in CZI; converted to micrometers)
- Reformats data into the (Z, C, Y, X) layout expected by OME-TIFF
- Writes the final OME-TIFF using the
numpy2ometiff.write_ome_tiff()function
All required metadata is set for compatibility with standard bioimaging software.
Contributing
Contributions are welcome!
If you'd like to add features, improve metadata parsing, or enhance compatibility with other CZI variants:
- Fork the repository
- Create a feature branch
- Submit a pull request
For major changes, please open an issue first to discuss your ideas.
License
This project is licensed under the BSD 3-Clause License — see the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file czi2ometiff-0.1.0.tar.gz.
File metadata
- Download URL: czi2ometiff-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ed0d90a11348689a2f3cb9a36691cea679db48fed3dc8dac63f1b503d22105c
|
|
| MD5 |
e4cb7167d0f0573c1b4aff7b29ac5e32
|
|
| BLAKE2b-256 |
e598f18f96075ea775f31c0a5266543de8490925b9264afc09563a82492fab0b
|
File details
Details for the file czi2ometiff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: czi2ometiff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0251b8c908fd1d884d73b5cd896ed985988a341926c20cc291a7b3b620baf68a
|
|
| MD5 |
e673e4939ac171aa87ea714925e9a4f5
|
|
| BLAKE2b-256 |
19bb7863c518ca3d897029e5ec139683f224901ad973689cf8e5048e4dd13890
|