Python bindings for the ODX format — TRX-style mmap container for ODFs, peaks, and SH coefficients
Project description
odx — Python bindings for the ODX format
Python bindings for odx-rs, a TRX-style
mmap-friendly container for orientation density functions (ODFs), peaks, and
spherical-harmonic coefficients from diffusion MRI.
Install
pip install odx # core package (numpy only)
pip install odx[dipy] # with the dipy adapter for PeaksAndMetrics interop
Quickstart
Compute CSD in dipy, dump to a peaked ODX in one call:
import odx
from dipy.reconst.csdeconv import ConstrainedSphericalDeconvModel
from dipy.direction.peaks import peaks_from_model
# ... fit a model, get csd_fit.shm_coeff (X, Y, Z, K)
peaked = odx.from_sh_coefficients(
csd_fit.shm_coeff, mask=mask, affine=affine,
basis="descoteaux07", sh_order=8, legacy=True,
)
peaked.save("csd.odx") # native, mmap-friendly
peaked.save_fz("autotrack.fz") # → DSI Studio fz
peaked.save_mrtrix("mrtrix_out/") # → MRtrix mif (auto-converts basis)
# Round-trip back to dipy if you want
pam = odx.to_peaks_and_metrics(peaked)
Features
- Native ODX I/O — read/write
.odxarchives or directories, mmap-backed for zero-copy NumPy views. - Peak finder — sphere-mesh local-maxima detection with MRtrix-style Gauss-Newton sub-vertex refinement on the SH series itself.
- Foreign format converters — load and save DSI Studio (
.fz,.fib.gz), MRtrix (fixel directories +.mif), Tortoise MAP-MRI, pyAFQ asymmetric ODFs. - dipy adapter (optional) — bidirectional conversion between
odx.Odxand dipy'sPeaksAndMetrics. Lazy-imported so dipy isn't required for the core package. - SH basis conversion — descoteaux07 ↔ tournier07 round-trips via amplitudes, including legacy/modern variants.
License
The bulk of odx-rs (and the Python bindings) is dual-licensed under the
MIT and
Apache 2.0
licenses, the typical Rust ecosystem dual-license. Pick whichever you prefer.
Two source files in the underlying Rust crate (src/peak_finder.rs and
src/mrtrix_sh.rs) port code from
MRtrix3 and remain governed by the
Mozilla Public License v. 2.0.
That's a file-scoped (weak) copyleft — modifications to those specific files
must remain MPL and source-available, but the license has no effect on
projects that simply use odx as a dependency.
SPDX summary: (MIT OR Apache-2.0) AND MPL-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odx-0.1.1.tar.gz.
File metadata
- Download URL: odx-0.1.1.tar.gz
- Upload date:
- Size: 279.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
836a0cc728336ec756624ee639f8f85536a30d8017b7e368a463da9e86d15d2c
|
|
| MD5 |
2a301ab216046b2c1cdc6f1a0fb4a9a9
|
|
| BLAKE2b-256 |
11153b6317e1e84460d591dd391c9b86859254e15fca727fe950e758c06ac468
|
Provenance
The following attestation bundles were made for odx-0.1.1.tar.gz:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1.tar.gz -
Subject digest:
836a0cc728336ec756624ee639f8f85536a30d8017b7e368a463da9e86d15d2c - Sigstore transparency entry: 1478547813
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f85c8907e60302fdef7cedd1fe8f2e1767b63902128a837bc7c38366f30cde2
|
|
| MD5 |
3e11cb7daf06d56f7c40ac441d2aaf11
|
|
| BLAKE2b-256 |
f16688136b47a84c2c931adcb3adf8e7bc70677bcaea23caa79c9e519d4d38bc
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-win_amd64.whl -
Subject digest:
9f85c8907e60302fdef7cedd1fe8f2e1767b63902128a837bc7c38366f30cde2 - Sigstore transparency entry: 1478548734
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f16bf034fe13ab9d31abc9d93aa8cdee9eff0a9eff9b4e082cb864772c7fd178
|
|
| MD5 |
f6756cc49d5657d963f09a2eb4edb843
|
|
| BLAKE2b-256 |
bb5c98df5b84dc75d7e2c63cfe37a410013db9156c65d4493729712ec2510eb3
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
f16bf034fe13ab9d31abc9d93aa8cdee9eff0a9eff9b4e082cb864772c7fd178 - Sigstore transparency entry: 1478548585
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20fc9ae5003df6b4924a90f3eb850e466f754d4d87462ac5e4854116e8a06074
|
|
| MD5 |
bc6ece6fe983a5bbabd49bee7c544e54
|
|
| BLAKE2b-256 |
1c2ccba31121690a966d65a251f42728813479a11a6c5b4eb2cc08f067eb1f77
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
20fc9ae5003df6b4924a90f3eb850e466f754d4d87462ac5e4854116e8a06074 - Sigstore transparency entry: 1478548905
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d86ad1c83ccb6129ea1e01b449ddd2b2d54df0abd4ad45d28eb45c9e4f33409
|
|
| MD5 |
98c0fe31d49bcdd14d3d85a9010dc479
|
|
| BLAKE2b-256 |
466d2e9797478e0355f8f58dd3a0401c5256a7a6768ba7278cb9c0a0ede74f14
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
1d86ad1c83ccb6129ea1e01b449ddd2b2d54df0abd4ad45d28eb45c9e4f33409 - Sigstore transparency entry: 1478549430
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b811f446677d1e6da81c7608fa143e555935712e7848d25d7360d3b8bf78d3bb
|
|
| MD5 |
6dfe0fc93e5460ce3cbc0a4b8e55c43f
|
|
| BLAKE2b-256 |
7464f627b07409af879385d70b85bbf14a9b0ae299aced5c95175af9b149815a
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
b811f446677d1e6da81c7608fa143e555935712e7848d25d7360d3b8bf78d3bb - Sigstore transparency entry: 1478548361
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cfaf0112ad77e34e2b43be79578939c71e7784b709b258a23262435dc8f039a
|
|
| MD5 |
b0b92b706c67c49940a5b1073049f4dc
|
|
| BLAKE2b-256 |
4e0cdaade1ca1d638307811f40199893cdf106cb1c40ad5b54cfe7a167ee70ff
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
6cfaf0112ad77e34e2b43be79578939c71e7784b709b258a23262435dc8f039a - Sigstore transparency entry: 1478549290
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odx-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: odx-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b83aef79dc59986a1073c1987343aa6f3ecb9c2193e682b6c46208104b7f6ce
|
|
| MD5 |
6e31c6c728ea7904823d701e304fb3ea
|
|
| BLAKE2b-256 |
31c9929acbca9e43ca753c7eb8b817d4d9b5df0fd642beeaa755096743a591e4
|
Provenance
The following attestation bundles were made for odx-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on PennLINC/odx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odx-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
0b83aef79dc59986a1073c1987343aa6f3ecb9c2193e682b6c46208104b7f6ce - Sigstore transparency entry: 1478548155
- Sigstore integration time:
-
Permalink:
PennLINC/odx-rs@5930080db8fbbbca6206702520747e977547cc06 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/PennLINC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5930080db8fbbbca6206702520747e977547cc06 -
Trigger Event:
push
-
Statement type: