Skip to content

Bio-Formats Support

Compare
Choose a tag to compare
@evamaxfield evamaxfield released this 27 Sep 17:59
· 126 commits to main since this release

AICSImageIO 4.2.0

We are happy to announce the release of AICSImageIO 4.2.0!

AICSImageIO is a library for image reading, metadata conversion, and image writing for microscopy formats in pure Python. It aims to be able to read microscopy images into a single unified API regardless of size, format, or location, while additionally writing images and converting metadata to a standard common format.

If you are new to the library, please see our full documentation for always up-to-date usage and a quickstart README.

Highlights

Bio-Formats Support

Breaking with our "reading and writing for microscopy formats in pure Python", and with a massive thanks to @tlambert03, we now support reading any file format supported by Bio-Formats.

from aicsimageio import AICSImage

nd2_img = AICSImage("my-file.nd2")
dv_img = AICSImage("my-file.dv")
oir_img = AICSImage("my-file.oir")

Just like our other readers, to add this additional file format support you will need to install with pip install aicsimageio[bioformats].
Note: ensure that you have the Java executable available on your PATH, or exposed with the JAVA_HOME environment variable. Adding Java to a conda virtual environment can be done with conda install -c conda-forge openjdk.)

For formats that can be read by both a native Python reader and the Bio-Formats reader, the native Python reader will always take precidence unless it has not been installed. I.e. CZI support can be added with either pip install aicsimageio[czi] or pip install aicsimageio[bioformats], if both are installed, our native Python reader will take precidence. The different readers may result in different pixel and metadata availablity. For full control over this behavior, specify the reader as a parameter.

from aicsimageio import AICSImage
from aicsimageio.readers.bioformats_reader import BioformatsReader
from aicsimageio.readers.czi_reader import CziReader

img_from_native = AICSImage("my-file.czi", reader=CziReader)
img_from_bf = AICSImage("my-file.czi", reader=BioformatsReader)

Contributing Documentation

Aren't satisfied with the available options for image reading? Want to contribute to the project? Our updated Contributing documentation has an entire section on adding a new file format reader.

We look forward to the continued growth of AICSImageIO in the community!

Experimental CZI-to-OME Metadata

For those following our experiments into "language agnostic methods for metadata translation and access" we have added experimental support for translating CZI metadata into OME metadata.

from aicsimageio import AICSImage

img = AICSImage("my-file.czi")
img.ome_metadata

You can find a comparison between the produced metadata from our XSLT and the produced metadata from Bio-Formats here. This is experimental, it is missing some metadata translations and may raise errors, however if you would like to try out this feature (or the XSLT itself in another language) please let us know how it goes.

Contributors and Reviewers this Release (alphabetical)

Matte Bailey (@MatteBailey)
Sébastien Besson (@sbesson)
Jackson Maxfield Brown (@JacksonMaxfield)
Talley Lambert (@tlambert03)
Josh Moore (@joshmoore)
Madison Swain-Bowden (@AetherUnbound)
Dan Toloudis (@toloudis)