Skip to main content

napari-aicsimageio

License Build Status Code Coverage

AICSImageIO bindings for napari


Features

  • Supports reading metadata and imaging data for:
    • OME-TIFF
    • TIFF
    • CZI (Zeiss)
    • LIF (Leica)
    • ND2 (Nikon)
    • DV (DeltaVision)
    • 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 or conda install napari-aicsimageio -c conda-forge
Development Head: pip install git+https://github.com/AllenCellModeling/napari-aicsimageio.git

Reading Mode Threshold

This image reading plugin will load the provided image directly into memory if it meets the following two conditions:

  1. The filesize is less than 4GB.
  2. The filesize is less than 30% of machine memory available.

If either of these conditions isn't met, the image is loaded in chunks only as needed.

Use napari-aicsimageio as the Reader for All File Formats

If you want to force napari to always use this plugin as the reader for all file formats, try running this snippet:

from napari.settings import get_settings

get_settings().plugins.extension2reader = {'*': 'napari-aicsimageio', **get_settings().plugins.extension2reader}

For more details, see #37.

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

Metadata

Release files for napari-aicsimageio 0.7.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 napari-aicsimageio 0.7.2
File Size Uploaded
napari-aicsimageio-0.7.2.tar.gz 20.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-aicsimageio 0.7.2
File Interpreter ABI Platform
napari_aicsimageio-0.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 MB

Release files / napari-aicsimageio-0.7.2.tar.gz

Download URL napari-aicsimageio-0.7.2.tar.gz
Size 20.6 MB
Tags Source
SHA-256 checksum
How to use checksums
20295120186fd98b2eb0f460844c44697eb981d17ab74d28229be7b9b118a482
BLAKE2b-256 checksum
How to use checksums
5c9022eba3c2d905dd545316afc5ff9c884056c2c099be914660780364653ee1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / napari_aicsimageio-0.7.2-py3-none-any.whl

Download URL napari_aicsimageio-0.7.2-py3-none-any.whl
Size 20.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
94f91ecaa7a16ae9d2e68670ae6f47b79ed32025be547d601ac64a46ace7ada2
BLAKE2b-256 checksum
How to use checksums
fe76b68406e97a8c049e8ad45863b8d38fc4eb8637c5b24c5a0325d8764c34d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.7.2 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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