Skip to main content

pycziutils

https://github.com/yfukai/pycziutils/actions/workflows/python-test.yml/badge.svg https://img.shields.io/pypi/v/pycziutils.svg Documentation Status

Python utilities to read (tiled) CZI files and parse metadata through python-bioformats

Installation

$ pip install pycziutils

Features

A tiny utility module to parse Zeiss CZI files in Python through python-bioformats. Parse tiled images, organize planes into pandas.DataFrame, and parse some hard-to-get metadata.

Example

import pycziutils


@pycziutils.with_javabridge
def main():
    czi_file_path="path/to/czi/file.czi"
    tiled_czi_ome_xml=pycziutils.get_tiled_omexml_metadata(czi_file_path)
    tiled_properties_dataframe=pycziutils.parse_planes(tiled_czi_ome_xml)

    print(tiled_properties_dataframe.columns)
    #Index(['index', 'X', 'Y', 'Z', 'T', 'C', 'C_index', 'T_index', 'Z_index', 'image',
    #       'plane', 'image_acquisition_T', 'absolute_T'],
    #        dtype='object')

    print(tiled_properties_dataframe.iloc[0])
    #index                                                 0
    #X                                             -1165.624
    #Y                                               122.694
    #Z                                                 0.001
    #T                                                 1.027
    #C                                                 Phase
    #C_index                                               0
    #T_index                                               0
    #Z_index                                               0
    #image                                                 0
    #plane                                                 0
    #image_acquisition_T    2021-04-12 02:12:21.340000+00:00
    #absolute_T             2021-04-12 02:12:22.367000+00:00
    #Name: 0, dtype: object

    #returns bioformats reader for tiled images
    reader=pycziutils.get_tiled_reader(czi_file_path)
    for i, row in tiled_properties_dataframe.iterrows():
        image = reader.read(
            series=row["image"],
            t=row["T_index"],
            z=row["Z_index"],
            c=row["C_index"],
        )

if __name__=="__main__":
    main()

Credits

This package uses python-bioformats to connect CZI files to Python.

This package was created with Cookiecutter and the wboxx1/cookiecutter-pypackage-poetry project template.

This package uses pysen for linting and formatting.

Metadata

Release files for pycziutils 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycziutils 0.3.2
File Size Uploaded Provenance Actions
pycziutils-0.3.2.tar.gz 8.8 kB Without provenance Details for pycziutils-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycziutils 0.3.2
File Interpreter ABI Platform Actions
pycziutils-0.3.2-py3-none-any.whl Python 3 none any Details for pycziutils-0.3.2-py3-none-any.whl

Total release size: 17.4 kB

Release files / pycziutils-0.3.2.tar.gz

Download URL pycziutils-0.3.2.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
254915ac2fe61b47f7799c6138f8daeb2b2d25651a3a800f55224e2991dd686c
BLAKE2b-256 checksum
How to use checksums
b0f801a0239d61e5ac4ec6918653c10c5018a2dbdfb2276b933b2d3030efaa4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.7 Darwin/19.6.0

Release files / pycziutils-0.3.2-py3-none-any.whl

Download URL pycziutils-0.3.2-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec2e78ae9013813ee517cdd6623042470ac1efd529570810735c6b6334abc095
BLAKE2b-256 checksum
How to use checksums
289ba558fe4e5a17317dd75055ff4d524c6aa306e264cc9bc0f27867878267ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.7 Darwin/19.6.0

Security for pycziutils 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page