Skip to main content

bone-microarchitecture icon

Bone Microarchitecture

Lightweight microarchitecture measurements from binary masks and optional calibrated grayscale arrays.

Author: Matthias Walle.

The array measurement API has no Slicer dependency and expects calibrated arrays on a common grid. File-based batch workflows use SimpleITK (and aimio-py for AIM) to load inputs and place cropped masks on the grayscale grid with nearest-neighbor resampling using origin, spacing, and direction. This is grid reconciliation, not registration; geometry-free arrays must already have the grayscale dimensions. The grid policy participates in batch cache compatibility so older incompatible maps are recomputed.

Batch discovery accepts canonical segmentation, periosteal, trabecular, and cortical roles from shared contour derivatives and their sidecars. See CHANGELOG.md for release notes.

GPU Backends

Exact Hildebrand sphere fitting supports three diameter-accumulation backends:

  • cpu: NumPy/SciPy fallback.
  • mps: native Apple Metal backend for macOS.
  • opencl: OpenCL backend for Windows/Linux systems with pyopencl and a working GPU OpenCL runtime.

Use thickness_backend="auto" to select Metal on macOS when available, OpenCL on Windows/Linux when available, and CPU otherwise.

Optional installs:

pip install "bone-microarchitecture[mps]"
pip install "bone-microarchitecture[opencl]"
pip install "bone-microarchitecture[gpu]"

Parameter Definitions

  • Tb.BMD: mean calibrated grayscale value inside the trabecular compartment.
  • Tb.BV/TV: trabecular bone volume divided by trabecular total volume.
  • Tb.Th: maximal-sphere local thickness of trabecular bone.
  • Tb.Sp: maximal-sphere local thickness of non-bone space in the trabecular compartment.
  • Tb.N: inverse ridge-to-ridge spacing estimate in the trabecular compartment.
  • Tb.1/N.SD: standard deviation of ridge-to-ridge spacing.
  • Tb.BV: trabecular bone volume.
  • Tb.TV: trabecular compartment volume.
  • Ct.BMD: mean calibrated grayscale value inside the cortical compartment.
  • Ct.Th: maximal-sphere local thickness of cortical bone.
  • Ct.Po: cortical pore volume divided by cortical total volume.
  • Ct.Po.V: cortical pore volume.
  • Ct.Po.Dm: maximal-sphere local diameter of cortical pore space.
  • Ct.BV: cortical bone volume.
  • Ct.TV: cortical compartment volume.

Metadata

Release files for bone-microarchitecture 0.2.5

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

Source distribution (sdist)

Source distribution for bone-microarchitecture 0.2.5
File Size Uploaded
bone_microarchitecture-0.2.5.tar.gz 40.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bone-microarchitecture 0.2.5
File Interpreter ABI Platform
bone_microarchitecture-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 71.8 kB

Release files / bone_microarchitecture-0.2.5.tar.gz

Download URL bone_microarchitecture-0.2.5.tar.gz
Size 40.9 kB
Tags Source
SHA-256 checksum
How to use checksums
24b4aa2fb6b296f2ffddf5aa1c12f9df9692e329081bb3573b4b0a458e9af0cd
BLAKE2b-256 checksum
How to use checksums
2db78a345ed6570de44898758524226ceb8d1848cd6a71fe5e07a778f9e212ac
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 2, 2026.

Transparency log

Release files / bone_microarchitecture-0.2.5-py3-none-any.whl

Download URL bone_microarchitecture-0.2.5-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9db38903ab1b9cec7cc7006b542ed20cf4d7c364198ee2674993c68cc8e942c
BLAKE2b-256 checksum
How to use checksums
4d129079e60410f855ec1d8e832eb82043b9fbab10954ec5e3b44dcbeb47ff50
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 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.1

2 release files

0.3.0

2 release files

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 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