Skip to main content

vitrio

vitrio reads and writes the image files of electron microscopy, such as MRC and TIFF. It is a C++ library with a Python package over it.

It is under construction. The code is being ported from the image subsystem of rexlib. The C++ library is here: MRC and TIFF files are read and written, whole or a batch at a time through a loader or a saver, and a scratch keeps a copy of what is read in memory or in a mapped file. The Python package is over it.

Building

vitrio needs a C++14 compiler and CMake 3.18 or newer. Its dependencies are found with find_package, so they have to be installed first: Boost (Filesystem, Interprocess and ContainerHash), half, spdlog and libtiff, and for the tests Catch2 3 and trompeloeil.

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build
cmake --install build --prefix <where>

To leave the tests out, and their two dependencies with them, add -DVITRIO_BUILD_TESTING=OFF. To leave TIFF out, and libtiff with it, add -DVITRIO_ENABLE_TIFF=OFF.

The Python package

pip install vitrio

The wheels hold everything they need. Where there is none for a platform, pip builds the package from its source, as pip install . does from this tree. The dependencies of the library then have to be installed, as for any other build, and pip brings the build tools.

To work on it, build it with -DVITRIO_BUILD_PYTHON=ON, which needs Python 3.10 or newer with nanobind installed in it. The package is assembled under python/ of the build tree, so that directory goes on PYTHONPATH.

import numpy
import torch
import vitrio

image = vitrio.read("map.mrc")
values = numpy.asarray(image)           # the same memory, not a copy
tensor = torch.from_dlpack(image)       # and again

stack = numpy.empty((64, 256, 256), dtype=numpy.float32)
locations = [vitrio.ImageLocation("stack.mrcs", i) for i in range(64)]
vitrio.read_batch_async(vitrio.loader(), stack, locations).get()

vitrio.write_stack(stack, "copy.mrcs")

An array is given as whatever hands out host memory through DLPack or the buffer protocol: a numpy array, a tensor of PyTorch or JAX, a memoryview. It is read or written where it is. The reads that allocate return a vitrio.Array, which hands its memory out in both ways too.

An asynchronous read or write returns a completion that keeps its array alive. Dropping a completion that is not ready waits for it.

Using it from CMake

find_package(vitrio REQUIRED)
target_link_libraries(my_program PRIVATE vitrio::vitrio)

Licence

vitrio is distributed under the GNU Lesser General Public License, version 2.1 or later. See LICENSE.

Metadata

Release files for vitrio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vitrio 0.1.0
File Size Uploaded
vitrio-0.1.0.tar.gz 595.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for vitrio 0.1.0
File
vitrio-0.1.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
vitrio-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vitrio-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
vitrio-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl CPython 3.12 abi3 macOS 11.0+ x86-64 Details
vitrio-0.1.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
vitrio-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
vitrio-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vitrio-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
vitrio-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 11.0+ x86-64 Details
vitrio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vitrio-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
vitrio-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vitrio-0.1.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details
vitrio-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 11.0+ x86-64 Details
vitrio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 14.3 MB

Release files / vitrio-0.1.0.tar.gz

Download URL vitrio-0.1.0.tar.gz
Size 595.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7fbadbfc764459da3ae2cb755594342ae373a5de6ad768dc70ae6c2ad602aafb
BLAKE2b-256 checksum
How to use checksums
edcaafe5f77cc77181a740bc5c0d0991762e258422e1830b7ed39424502500f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp312-abi3-win_amd64.whl

Download URL vitrio-0.1.0-cp312-abi3-win_amd64.whl
Size 778.9 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e408afd8311e2274793677e1c42b09dc9a93c35975352bb7be988a234da532e4
BLAKE2b-256 checksum
How to use checksums
dede38bbe7e24eaccec2f6829c771d5501a39c6a0914c700384382d6b62f0e62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vitrio-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
ed541659fb10fe1fa768a88d2c7618ce3e0d9e0e7550f9f47f70943497e5da6d
BLAKE2b-256 checksum
How to use checksums
a21e6ccf65bd995e79a9c80296661914424a009758ee01909e12f3846636e121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL vitrio-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
47924dfc1aa71a85a79849c0eb45b9774b1008c8e9f6b51cc3939cd0bfab9ef6
BLAKE2b-256 checksum
How to use checksums
dc80cb8f411b376ac9e36f16ac8aa67498860775251ff3ecde308c7ab773a656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl

Download URL vitrio-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl
Size 698.2 kB
Tags CPython 3.12 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
b3bd0ae82d9487c66d4ab9e8151b1b816b7feb62021fcc82cb07721360cfebe4
BLAKE2b-256 checksum
How to use checksums
81625aebcb911ab3f3de3ba64015782e98bc636fc266ce9aa3e0bd53016012b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL vitrio-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Size 599.7 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
68aedf8f72f875d63e0d3f9cdea4be0903ba17e6bd14fb2fa082ae47b947a399
BLAKE2b-256 checksum
How to use checksums
45009b2de3a57a725147afe8b1b573990b19ce0cecd984b8d7f9e6cde22a6bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp311-cp311-win_amd64.whl

Download URL vitrio-0.1.0-cp311-cp311-win_amd64.whl
Size 779.5 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
16c03566a76a327a39cc9da46b9ef8a0230fbfec22838c7faff82d87463ff808
BLAKE2b-256 checksum
How to use checksums
6eb48b763ce09263b4c26645d33e8b2fc7a70b4bdb3405d4ff642c09ac811cb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vitrio-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3a117ed98be3b3c11016b31e1bffdfaa33357dd6a5d997f128b5e523a4a59350
BLAKE2b-256 checksum
How to use checksums
e942354341b46777d8cd27c9a2dabf8d5faa4a67dae7809ef840a2c07a9b1380
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL vitrio-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2a529cb5749b841fd2350586d1f4adced0c0388bb158d4c96612e2d9f879b92b
BLAKE2b-256 checksum
How to use checksums
6d3f550eabe7f1639605804f0db4b0a4ae9cf698d216a6bb5ef32cfd53ead6aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl

Download URL vitrio-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl
Size 700.4 kB
Tags CPython 3.11 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
ad768d7f9d90d601882f0021696baab6f9797c7a87bc9154e7e3735890560041
BLAKE2b-256 checksum
How to use checksums
09e693135cc15f767ab424044b25e15f63a004036bce88f5d5d9ad149c3b8150
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL vitrio-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 601.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
43a9fd3a0f86d4718c37d047cafa4bac4241a28dca7b45af8743a2c9865d7833
BLAKE2b-256 checksum
How to use checksums
458662ae8026525358e34becc0721631c703ca61979bfcb7859f355316262da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp310-cp310-win_amd64.whl

Download URL vitrio-0.1.0-cp310-cp310-win_amd64.whl
Size 779.1 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f4c23868f7fdd66fc1b606833646f7b6dd24f4dd3e05ee16cfae2ce83d70c790
BLAKE2b-256 checksum
How to use checksums
557eedfd146ff1828ddd1b97c221ff653b85f909cb51eeb897ebbc293f71c57f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vitrio-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7aad725ca389b682491d3684c828e74b9f7cd8f4aaa4302c3c022979c86261b0
BLAKE2b-256 checksum
How to use checksums
3dc37f3bc1803a96f2891e02f8555d1ff3a2acc2228eb224e34c9e60367437e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL vitrio-0.1.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
906a366e5b1b41ca9aac57730e17af115ba966d2ba1e52520f8a0275d98345b5
BLAKE2b-256 checksum
How to use checksums
80fc108488a487bf863edfdd566c57c75bd9b9ce14d8fb0a464dd6fcce1501d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl

Download URL vitrio-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl
Size 699.3 kB
Tags CPython 3.10 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
9df43a316579d167d4a7df44e555c684cc67a5bd7aba853f43926d516c5e3a9b
BLAKE2b-256 checksum
How to use checksums
bb5962a655ce036455ee25f6b7c05c1fd98ecd1436000135965dc9e2c1beb9c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / vitrio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL vitrio-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Size 601.0 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f48d0aa2da036de5318626ad38a237b6f1da19af049b8fc566be3887bd66fdca
BLAKE2b-256 checksum
How to use checksums
9d76651f0467f0eb71ef17431a133f7bd0da48dc3e55c8140e629a120ef726b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.4

16 release files

0.1.3

16 release files

0.1.2

16 release files

0.1.1

16 release files

This release

0.1.0 This release

16 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