High-throughput image I/O for Cryo-Electron Microscopy (cryo-EM and cryo-ET).
vitrio reads and writes micrographs, movies, particle stacks, volumes and tomograms in MRC, TIFF, EER, DigitalMicrograph and ZARR files. The same calls work on every format, and the pixels land in memory you already have: a NumPy array, a PyTorch or JAX tensor, or your own buffer in C++. vitrio can keep a copy of data that sits on slow storage on a fast local disk, which it fills as the data is first read, with no change to the code that reads. It is also fast for programs that go through many images, such as particle extraction, processing pipelines and the training of neural networks: you ask for a whole batch in one call, and it is read in the background. It is a C++14 library with a Python package on top.
pip install vitrio
import vitrio as vio
micrograph = vio.read("micrograph.mrc")
particle = vio.read(vio.ImageLocation.from_string("12@particles.mrcs"))
tomogram = vio.read("tomogram.zarr")
Documentation
- Performance guide Which functions to call, and how to set them up for your storage.
- Supported formats The data types, the compression and the metadata of each format.
- Python reference The package, from its docstrings.
- C++ reference The public headers.
- Source and examples On GitHub, with the README that introduces the library.