plate-rod-thinning
plate-rod-thinning provides topology-preserving trabecular bone plate/rod thinning and morphometry for HR-pQCT-style binary masks.
The package ports the original MATLAB plate/rod workflow into Python while keeping the core algorithm outside the Slicer Bone Imaging Toolbox. It produces 1-voxel skeleton topology labels, full-thickness plate/rod/junction labels, individual full-thickness component labels, and summary morphometry metrics.
Method
The default pipeline uses topology-preserving thinning followed by Saha/Stauber-style local skeleton classification. Final topology classes are decomposed into individual trabecular elements using an ITS-like graph workflow:
- classify skeleton voxels into surface, curve, and typed junction classes;
- dilate typed junction zones before element decomposition;
- label plate and rod components after junction-zone removal;
- reconstruct individual element labels back into the full-thickness trabecular mask;
- count P-P, P-R, and R-R junctions from unique neighboring reconstructed element pairs.
The current defaults provide a conservative decomposition for HR-pQCT-style trabecular masks:
PlateRodParameters(
junction_dilation_voxels=2,
min_plate_voxels=0,
min_rod_voxels=5,
junction_support_radius_voxels=None,
)
junction_support_radius_voxels is available for experiments that require reconstructed junctions to be spatially supported by matching typed skeleton junction classes. It is disabled by default because this package treats the reconstructed element graph as the primary output.
Validation Notes
The defaults were checked on an HR-pQCT II tibia test case to confirm that the outputs are numerically plausible and internally consistent for trabecular bone analysis. This package implements an open, auditable plate/rod thinning and graph morphometry workflow; it is not intended to be a bitwise or parameter-matched clone of any proprietary ITS implementation.
Install
python -m pip install plate-rod-thinning
Prebuilt macOS wheels include the compiled C backend when available. The package also has a Python fallback, and on Apple platforms the Metal skeletonizer can be enabled with:
export PLATE_ROD_USE_METAL_FULL=1
Citation
If you use the plate/rod network connectivity or morphometry workflow, please cite:
Walle M, Yeritsyan D, Abbasian M, Oftadeh R, Müller R, Nazarian A. A graph model to describe the network connectivity of trabecular plates and rods. Front Bioeng Biotechnol. 2024 May 6;12:1384280. doi: 10.3389/fbioe.2024.1384280. PMID: 38770275; PMCID: PMC11103010.
Development
The compiled extension is opt-in for local source builds:
PLATE_ROD_BUILD_EXT=1 python -m pip install .
python -m pytest -q
Metadata
Release files for plate-rod-thinning 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plate_rod_thinning-0.1.3.tar.gz | 51.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| plate_rod_thinning-0.1.3-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details |
| plate_rod_thinning-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl | CPython 3.13 | CPython 3.13 | macOS 10.13+ x86-64 | Details |
| plate_rod_thinning-0.1.3-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
| plate_rod_thinning-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl | CPython 3.12 | CPython 3.12 | macOS 10.13+ x86-64 | Details |
Total release size: 296.0 kB
Release files / plate_rod_thinning-0.1.3.tar.gz
| Download URL | plate_rod_thinning-0.1.3.tar.gz |
|---|---|
| Size | 51.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b9c618632cfb0487f66c116443fa1d1c53b4c72a44896f655c09194cbf41fb4
|
|
BLAKE2b-256 checksum How to use checksums |
4c1581e1f75f5f774e1c40fe758475a314ee4fff0aac905ad9738b7db2bed65e
|
| 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 Aug 29, 2026.
Transparency logRelease files / plate_rod_thinning-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | plate_rod_thinning-0.1.3-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 60.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f45ccf5cc3a744ac012c9e35403485e0f644919f2ab7c069133a9dc81c307775
|
|
BLAKE2b-256 checksum How to use checksums |
3164fd40237819de9bea3d37a13fd8aef252fe9dbcbb6aba8f09051e3663812a
|
| 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 Aug 29, 2026.
Transparency logRelease files / plate_rod_thinning-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | plate_rod_thinning-0.1.3-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 61.8 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
507a5c7418eaea5a783529dcca366daa50a9a85e0381de74c46af71803c6c054
|
|
BLAKE2b-256 checksum How to use checksums |
33a59c95e5f4f68644408b5ba9e09023be7ab50f04f9a1d8aeb8d3144a9f36ca
|
| 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 Aug 29, 2026.
Transparency logRelease files / plate_rod_thinning-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | plate_rod_thinning-0.1.3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 60.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
102385b0130f420f1bd39732000da9c90e9ef9188f029bec39a7444d8a98f160
|
|
BLAKE2b-256 checksum How to use checksums |
a2939b83bdd4cdd6412c64213f3f190402f320970433075b9272fd79d2dc7ca8
|
| 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 Aug 29, 2026.
Transparency logRelease files / plate_rod_thinning-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | plate_rod_thinning-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 61.8 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
344e94b36a5353c3e8d760445cd69c28382d75cac915261c306a24122e9126d0
|
|
BLAKE2b-256 checksum How to use checksums |
54f217ee2a6fa39f19c78afcda7ff4ebc49bc1d083374e5873db8aa06fae76ee
|
| 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 Aug 29, 2026.
Transparency log