Skip to main content

Simple reading and writing classes for tiled tiffs using Bioformats.

Project description

BioFormats Input/Output utility (bfio v2.1.4)

Documentation Status PyPI PyPI - Downloads Bower

This tool is a simplified but powerful interface to the Bioformats java library. It makes use of parts of Cell Profilers python-bioformats package to access the Bioformats library. One of the issues with using the python-bioformats package is reading and writing large image planes (>2GB). The challenge lies in the way Bioformats reads and writes large image planes, using an int value to index the file. To get around this, files can be read or written in chunks and the classes provided in bfio handle this automatically. The BioWriter class in this package only writes files in the .ome.tif format, and automatically sets the tile sizes to 1024.

Docker containers with all necessary components are available (see Docker Containers section).

Summary

Installation

Setting up Java

Note: bfio can be used without Java, but only the python and zarr backends will be useable. Only files in tiled OME Tiff or OME Zarr format can be read/written.

In order to use the Java backend, it is necessary to first install the JDK. The bfio package is generally tested with JDK 8, but JDK 11 and later also appear to work.

Installing bfio

The bfio package and the core dependencies (numpy, tifffile, imagecodecs) can be installed using pip:

pip install bfio

Additionally, bfio with other dependencies can be installed:

  1. pip install bfio[jpype] - Adds support for BioFormats/Java
  2. pip install bfio[zarr] - Adds support for OME Zarr
  3. pip install bfio[all] - Installs all dependencies.

Documentation

Documentation and examples are available on Read the Docs.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Nick Schaub (nick.schaub@nih.gov, nick.schaub@labshare.org)

License

This project is licensed under the MIT License Creative Commons License - see the LICENSE file for details

Acknowledgments

  • Parts of this code were written/modified from existing code found in python-bioformats and tifffile.

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

bfio-2.1.4.tar.gz (41.9 MB view hashes)

Uploaded Source

Built Distribution

bfio-2.1.4-py3-none-any.whl (41.9 MB view hashes)

Uploaded Python 3

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