aimio-py
Python bindings for the Numerics88 AimIO C++ library.
aimio-py provides a small Python API to read and write AIM files as NumPy arrays, read ISQ files, inspect metadata, and work with processing logs.
Features
- Read AIM files into NumPy arrays
- Write AIM files from NumPy arrays
- Read ISQ files into NumPy arrays
- Access AIM and ISQ header metadata (
aim_info,isq_info) - Convert processing logs between text and dictionary formats
- Optional density/HU conversion helpers
Installation
From PyPI (recommended):
pip install aimio-py
From source:
git clone https://github.com/wallematthias/aimio-py.git
cd aimio-py
git submodule update --init --recursive
pip install -e .
Quickstart
from py_aimio import read_aim, read_isq, write_aim
array, meta = read_aim("scan.AIM")
print(meta["origin"], meta["spacing"], meta["direction"])
write_aim("copy.AIM", array, meta)
isq_array, isq_meta = read_isq("scan.ISQ")
Reading ISQ files
from py_aimio import isq_info, read_isq
info = isq_info("scan.ISQ")
print("Dimensions:", info["dimensions"])
print("Voxel spacing:", info["spacing"])
array, meta = read_isq("scan.ISQ")
print(array.shape, array.dtype) # (z, y, x), int16
hu_array, hu_meta = read_isq("scan.ISQ", unit="hu")
bmd_array, bmd_meta = read_isq("scan.ISQ", unit="density")
API
aim_info(path)isq_info(path)read_aim(path, density=False, hu=False) -> (array, meta)read_isq(path, unit="native") -> (array, meta)write_aim(path, array, meta=None, unit=None)get_aim_density_equation(processing_log)get_aim_hu_equation(processing_log)log_to_dict(log)dict_to_log(dct)
For ISQ files, unit="native" returns stored scanner values. unit="hu" and
unit="density"/unit="bmd" use calibration metadata from the ISQ extended
header when present.
Read metadata includes SimpleITK-style geometry keys for both AIM and ISQ:
origin, spacing, and direction. For AIM, spacing is copied from
element_size and origin follows the ITKIOScanco-compatible convention:
(position + offset) * spacing. The older vtkbone-style half-voxel-shifted
origin is also exposed as vtkbone_origin. For ISQ, spacing comes from the ISQ
header and origin defaults to (0.0, 0.0, 0.0). direction currently defaults
to the 3D identity direction, matching the practical behavior observed from
ITKIOScanco for ISQ files without explicit orientation metadata.
Development
Run tests:
pytest -q
Run tests with coverage:
pytest -q --cov=py_aimio --cov-report=term-missing --cov-report=xml:coverage.xml
Build local artifacts:
python -m build --wheel --sdist
Build documentation from docstrings:
pip install sphinx
make -C docs html
Generated HTML will be in docs/build/html/index.html.
Important build note
This project depends on the external/AimIO and external/n88util git submodules. If they are missing, extension builds will fail.
Attribution
py_aimio/calibration.pyis adapted from Bonelab/Bonelab.py_aimio/header_log.pyis by Matthias Walle.
License
MIT
Metadata
Release files for aimio-py 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aimio_py-0.1.6.tar.gz | 57.5 kB | Details |
Built distributions (wheels)
Total release size: 9.0 MB
Release files / aimio_py-0.1.6.tar.gz
| Download URL | aimio_py-0.1.6.tar.gz |
|---|---|
| Size | 57.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc75ad9fcfb869d7955f826b0f106ff2684edb12c268f639a9bd4e18e5680a5e
|
|
BLAKE2b-256 checksum How to use checksums |
597492b469b95d91fc61181d7553d9f329d4014ae3a25dc14f530891994fc2c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp313-cp313-win_amd64.whl
| Download URL | aimio_py-0.1.6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 314.3 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dbd5e2aead5707fbf1009919923dbf514866e1e4ba19a846ad95e4056b1502e4
|
|
BLAKE2b-256 checksum How to use checksums |
09fbe8fddd3aca4f7d9ccd659557f37b495af786c6b2ed8318fed1df32660f0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | aimio_py-0.1.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a4dd5f7bfedfd0158d9ab0e276e11800b0d78c9831530040c7e6b34dd207817
|
|
BLAKE2b-256 checksum How to use checksums |
8817a0f788022b7d93fc97a3de4b186852a4c6e9db32d3b273465acda1a286c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aimio_py-0.1.6-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 124.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
74d6a209846e423ce8684b6f7448d7a3be301e08fb7442c23bb9e57382f01b21
|
|
BLAKE2b-256 checksum How to use checksums |
82f8fa141bfd1d5bccf5b5d8fdb7ec3b9d60163f080c6a37f5b1a417f6fcd399
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | aimio_py-0.1.6-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 130.8 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
4523599744d75b75352ddeb2efe4f7f8dc950c2dc4ab1c62371c6111ce3db505
|
|
BLAKE2b-256 checksum How to use checksums |
49d17ea3708340d4a4a74efc6453648f858ce83f49b317c063abd16b7de4699f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp312-cp312-win_amd64.whl
| Download URL | aimio_py-0.1.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 314.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6983452b8f49b36c0e1b1a08be10d09d6732218a824154bf05786511527f0dd0
|
|
BLAKE2b-256 checksum How to use checksums |
416878c6f13aa72e55f95a6908179dad419a281fd4b108e61724b325c381caec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | aimio_py-0.1.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4d0d135665c888ed5983b8a182d3356a518b9f8460bb44dd74101b8ae351ae6f
|
|
BLAKE2b-256 checksum How to use checksums |
0b7ea448b1fef0208f5cde5c32678e73c8c616a1cdf00b0a2e77675aee6d4c8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aimio_py-0.1.6-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 124.5 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
661a695ad74084e85836c58465cbe623576dc21710f29df22032a2c534d258a0
|
|
BLAKE2b-256 checksum How to use checksums |
827c8e7b156177c9041d49fabd3d092789ff0dec04f54b589c530192f9f82d3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | aimio_py-0.1.6-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 130.7 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
bbf9c88b159aad010106ec54f35e86bb80cf2561c6fbd262b7bf93282a4a469f
|
|
BLAKE2b-256 checksum How to use checksums |
88c2b1fc84f85812000f71b835aae9b319f3407ab56b49ab4a1ebb8edc002bbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp311-cp311-win_amd64.whl
| Download URL | aimio_py-0.1.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 311.7 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bc63f84d8ba9e5a7f1cc4a1dc60470627fb46ab848575d5e797674cf07b6d615
|
|
BLAKE2b-256 checksum How to use checksums |
43c46d58dc4aa15f7269827cd439a3a7210757107174b8c417453b19e59a4a68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | aimio_py-0.1.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
981b851feb7883b133a941ea49d072a9dbe915ff4f44167764c754a1ed49deaa
|
|
BLAKE2b-256 checksum How to use checksums |
e4a11c6434772001d6d3d9a3861224827f11556df64ac3b95d95855a52b7b44c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aimio_py-0.1.6-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 122.8 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
37627631d4cba3e6fc157ac41081dfac84cf9683e78aa7d19c7cecf39fc0f0fa
|
|
BLAKE2b-256 checksum How to use checksums |
9de3b17353e9026910d76c76c2ea487e1b4a5cd655734e1e26021e433db015d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | aimio_py-0.1.6-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 128.5 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f0f11ef9cc07ceab5392d7ccd0f2a9ffec00f53c005f7e969f50854d7f13f9f7
|
|
BLAKE2b-256 checksum How to use checksums |
9f7710964af73fd0f9c4f81bab144d2ff7f068790dd3faacdaf61fbbdf7ade6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp310-cp310-win_amd64.whl
| Download URL | aimio_py-0.1.6-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 311.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e8fe7439973740ef7eeec84c7c0547b3f3b261f8a4a5b7a21143760df328618f
|
|
BLAKE2b-256 checksum How to use checksums |
0ee4cdce235b5d5363d6ec553a31de65fc2a63c1b1b8c286b92860f6c80edec8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | aimio_py-0.1.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5a5614f3ef3945fa2143d66a7d1552639fb6fd360f3cccc1f2e29c44945f0ea7
|
|
BLAKE2b-256 checksum How to use checksums |
01e4752b41dbbb8dbbaf53c069e0e02662cbb72f862ecdcd6205e646d43709a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aimio_py-0.1.6-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 121.5 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e80ca62bb53a47098292244156989bafe19087822c0812a2f23ee9bc900cbcef
|
|
BLAKE2b-256 checksum How to use checksums |
efd45780c3aaab41007a727d09926e5fc391f701d66fb1cddc080aa4df866b29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / aimio_py-0.1.6-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | aimio_py-0.1.6-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 127.1 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
cf8844400458f933f8e92afcb740d0d4fc764f33399e1628c2dd2514f4eedecf
|
|
BLAKE2b-256 checksum How to use checksums |
59fa3d86a4c1519bf366bf3cc34bb0e80db729740eaf1bfd5a6f305b42051d49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency log