Simple reading and writing classes for tiled tiffs using Bioformats.
Project description
BioFormats Input/Output utility (bfio)
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
backend will be
useable. Only files in tiled OME Tiff 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 also appears to work.
Once the JDK is installed, additional dependencies can be installed using:
pip install python-javabridge==4.0.0 python-bioformats==4.0.0
If there are issues installing python-javabridge
, refer to the
documentation
Installing bfio
The bfio
package and the core dependencies (numpy, tifffile, imagecodecs) can
be installed using pip:
pip install bfio
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
andtifffile
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.