Skip to main content

fiberorient

codecov

fiberorient is a package for performing structure tensor analysis and calculating orientation distribution functions from 3D imaging data.

Code and methodology stem from work published as:

Trinkle, S., Foxley, S., Kasthuri, N., La Rivière, P., “Synchrotron x-ray micro-CT as a validation dataset for diffusion mri in whole mouse brain,” Magnetic Resonance in Medicine, vol. 86, no. 2, pp. 1067–1076, 2021.

For more information, see my blog post.

Installation

fiberorient can be installed with pip:

pip install fiberorient

For local installation, first clone the repo:

git clone https://github.com/scott-trinkle/fiberorient.git

cd into the directory:

cd fiberorient

and run (preferably in a virtual environment):

pip install -e .

Usage

The primary utility of fiberorient is estimating the orientation of local structures in 3D imaging data using structure tensor analysis:

from fiberorient import StructureTensor

img = np.load('img_data')  # some 3D image data
st = StructureTensor(d_sigma=1, n_sigma=3)
st.fit(img)
vectors = st.get_vectors(img)

fiberorient is also used to express groups of vectors as orientation distribution functions (ODFs) on a basis of real, even spherical harmonic functions:

from fiberorient.odf import ODF
from fiberorient.util import make_sphere

odf = ODF(degree=8)
odf.fit(vectors)

sphere = make_sphere(3000)
odf_on_sphere = odf.to_sphere(sphere)

The package also includes a number of utilities in the vis module for generating useful data visualizations, as well as metrics for comparing arrays of vectors and ODFs in the metrics module.

Further examples are available as Jupyter notebooks in examples/

Metadata

Release files for fiberorient 0.2

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

Source distribution (sdist)

Source distribution for fiberorient 0.2
File Size Uploaded Provenance Actions
fiberorient-0.2.tar.gz 11.4 MB Without provenance Details for fiberorient-0.2.tar.gz

Release files / fiberorient-0.2.tar.gz

Download URL fiberorient-0.2.tar.gz
Size 11.4 MB
Tags Source
SHA-256 checksum
How to use checksums
e3a45c8308e678d7ce2ecdff70fbcf14941794b2e1907c9dbe7f00d2c67d7409
BLAKE2b-256 checksum
How to use checksums
0bfe1ec21a5bc1ee20ea794fc3d54a957a7f6cc5c8847aaabe6d8657f7741f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

Security for fiberorient 0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

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