medialaxis3d
This package extends the scikit-image function medial_axis to the 3D case.
Install
pip install medialaxis3d
Dependencies
Automatically installed with pip:
numpyscipycython
Optional only for visualization
napari
Documentation
WIP
Quickstart
Use it without returning the medial distance.
>>> import numpy as np
>>> import skimage as ski
>>> import medialaxis3d
>>> import napari
>>> rng = np.random.default_rng(1278)
>>> image = ski.data.binary_blobs(length = 128,
>>> blob_size_fraction = 0.2,
>>> n_dim = 3,
>>> volume_fraction = 0.6,
>>> rng = rng)
>>> skeleton = medialaxis3d.medial_axis_3d(image,
>>> return_distance = False,
>>> size = 8,
>>> rng = rng)
>>> viewer = napari.Viewer()
>>> viewer.add_image(image,
>>> rendering = "attenuated_mip",
>>> attenuation = 0.5,
>>> scale = [1, 1, 1])
>>> viewer.add_image(skeleton,
>>> interpolation3d = "nearest",
>>> colormap = "magenta",
>>> scale = [1, 1, 1])
>>> napari.run()
or use it to return the distance as well.
>>> import numpy as np
>>> import skimage as ski
>>> import medialaxis3d
>>> import napari
>>> rng = np.random.default_rng(1278)
>>> image = ski.data.binary_blobs(length = 128,
blob_size_fraction = 0.2,
n_dim = 3,
volume_fraction = 0.6,
rng = rng)
>>> skeleton, distance = medialaxis3d.medial_axis_3d(image,
>>> return_distance = True,
>>> size = 8,
>>> rng = rng)
>>> viewer = napari.Viewer()
>>> viewer.add_image(image,
>>> rendering = "attenuated_mip",
>>> attenuation = 0.5,
>>> scale = [1, 1, 1])
>>> viewer.add_image(skeleton*distance,
>>> interpolation3d = "nearest",
>>> colormap = "turbo",
>>> scale = [1, 1, 1])
>>> napari.run()
Metadata
Release files for medialaxis3d 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| medialaxis3d-1.0.3.tar.gz | 3.0 MB | Without provenance | Details for medialaxis3d-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medialaxis3d-1.0.3-cp313-cp313-manylinux_2_39_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.39+ x86-64 | Details for medialaxis3d-1.0.3-cp313-cp313-manylinux_2_39_x86_64.whl |
Total release size: 6.2 MB
Release files / medialaxis3d-1.0.3.tar.gz
| Download URL | medialaxis3d-1.0.3.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ee35c6711706663c9091bbdd6ab8f7924fe734525e4c036305d70a4b7cf5ec3
|
|
BLAKE2b-256 checksum How to use checksums |
306a92d5df10256266ce6c9ebd55d5e3fbc6cfda3e2b3f0e77c0eed94d71e7fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / medialaxis3d-1.0.3-cp313-cp313-manylinux_2_39_x86_64.whl
| Download URL | medialaxis3d-1.0.3-cp313-cp313-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
593a35e7d791fd2ec1f988e1cc1cca04d0bdd15db80f206dc71e11696153caaf
|
|
BLAKE2b-256 checksum How to use checksums |
566e799c5b4bab940ec277d211513bb86eb14d97758bd5d4a3ff84a6b6382b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for medialaxis3d 1.0.3
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.