Skip to main content

AICSImageIO for napari. Multiple file format reading directly into napari using pure Python.

Project description

napari-aicsimageio

License Build Status Code Coverage

AICSImageIO bindings for napari


Features

  • Supports reading metadata and imaging data for:
    • OME-TIFF
    • TIFF
    • CZI
    • LIF
    • ND2
    • DV
    • Any formats supported by aicsimageio
    • Any formats supported by bioformats
    • Any additional format supported by imageio

While upstream aicsimageio is released under BSD-3 license, this plugin is released under GPLv3 license because it installs all format reader dependencies.

Installation

Stable Release: pip install napari-aicsimageio
Development Head: pip install git+https://github.com/AllenCellModeling/napari-aicsimageio.git

Plugin Variants

screenshot of plugin sorter showing that napari-aicsimageio-in-memory should be placed above napari-aicsimageio-out-of-memory

There are two variants of this plugin that are added during installation:

  • aicsimageio-in-memory, which reads an image fully into memory
  • aicsimageio-out-of-memory, which delays reading ZYX chunks until required. This allows for incredibly large files to be read and displayed.

Examples of Features

General Image Reading

All image file formats supported by aicsimageio will be read and all raw data will be available in the napari viewer.

In addition, when reading an OME-TIFF, you can view all OME metadata directly in the napari viewer thanks to ome-types.

screenshot of an OME-TIFF image view, multi-channel, z-stack, with metadata viewer

Multi-Scene Selection

When reading a multi-scene file, a widget will be added to the napari viewer to manage scene selection (clearing the viewer each time you change scene or adding the scene content to the viewer) and a list of all scenes in the file.

gif of drag and drop file to scene selection and management

Access to the AICSImage Object and Metadata

napari viewer with console open showing viewer.layers[0].metadata

You can access the AICSImage object used to load the image pixel data and image metadata using the built-in napari console:

img = viewer.layers[0].metadata["aicsimage"]
img.dims.order  # TCZYX
img.channel_names  # ["Bright", "Struct", "Nuc", "Memb"]
img.get_image_dask_data("ZYX")  # dask.array.Array

The napari layer metadata dictionary also stores a shorthand for the raw image metadata:

viewer.layers[0].metadata["raw_image_metadata"]

The metadata is returned in whichever format is used by the underlying file format reader, i.e. for CZI the raw metadata is returned as an xml.etree.ElementTree.Element, for OME-TIFF the raw metadata is returned as an OME object from ome-types.

Lastly, if the underlying file format reader has an OME metadata conversion function, you may additionally see a key in the napari layer metadata dictionary called "ome_types". For example, because the AICSImageIO CZIReader and BioformatsReader both support converting raw image metadata to OME metadata, you will see an "ome_types" key that stores the metadata transformed into the OME metadata model.

viewer.layers[0].metadata["ome_types"]  # OME object from ome-types

Mosaic Reading

When reading CZI or LIF images, if the image is a mosaic tiled image, napari-aicsimageio will return the reconstructed image:

screenshot of a reconstructed / restitched mosaic tile LIF

Development

See CONTRIBUTING.md for information related to developing the code.

For additional file format support, contributed directly to AICSImageIO. New file format support will become directly available in this plugin on new aicsimageio releases.

Citation

If you find aicsimageio (or napari-aicsimageio) useful, please cite as:

AICSImageIO Contributors (2021). AICSImageIO: Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Pure Python [Computer software]. GitHub. https://github.com/AllenCellModeling/aicsimageio

Free software: GPLv3

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

napari-aicsimageio-0.6.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

napari_aicsimageio-0.6.0-py2.py3-none-any.whl (20.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file napari-aicsimageio-0.6.0.tar.gz.

File metadata

  • Download URL: napari-aicsimageio-0.6.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for napari-aicsimageio-0.6.0.tar.gz
Algorithm Hash digest
SHA256 cdbae0443cf0fdbac7fbb7ee1b12bb87cd665e527ccb024aea366298abb5e052
MD5 b65fc059c3ff2d53b36559b38cf53437
BLAKE2b-256 c7ba3f46d1a770c98e2bdb80649a8009eec2c8ca3a4d2ed30f6817fa08a8bb05

See more details on using hashes here.

File details

Details for the file napari_aicsimageio-0.6.0-py2.py3-none-any.whl.

File metadata

  • Download URL: napari_aicsimageio-0.6.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for napari_aicsimageio-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e7ecd2896e80727dcab301e7e6b6fc5329b10754b90a4cf14dbcb81c0a61ab56
MD5 9771477373adb9148e31547a889f0c4a
BLAKE2b-256 7a616b5e8abbfe3974a59b6b47b8fe2f0782540fa951a574f9be97e9413db347

See more details on using hashes here.

Supported by

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