gaara
Skeleton thinning algorithm for large images.
import gaara
import numpy as np
arr = np.load(...) # some 3d array in fortran order
# binary images are more efficient to process
# 80% of the memory and faster.
# in_place: modify the input array in_place (saves memory)
# binary_image: consider the input image a binary image (foreground/bg only)
# regardless of values. 0 is background.
# preserve_endpoints: mark endpoints 3x3x3 stencils containing exactly 2 foreground voxels
# for preservation. By default, the palagyi algorithm is more aggressive.
arr = gaara.skeletonize(arr, binary_image=True, in_place=False, preserve_endpoints=False)
arr = gaara.skeletonize(arr, binary_image=False, in_place=False, preserve_endpoints=False)
Gaara is a skeletion generation via voxel thinning algorithm based on Palágyi's 2014 paper [1] and inspired by Matejek et al.'s work on synapseaware. [2]
While efficient and fine for tracing neurites that have a natural tree structure, a shortcoming of Kimimaro is its inability to generate topologically correct skeletons [3] which have applications to e.g. glia and blood vessels.
Gaara attempts to be an efficient voxel thinning algorithm implementation that can handle very large images on a single machine by making use of crackle compression dynamically.
Installation
The PyPI page is located here.
pip install gaara
If you are installing from source, ensure the lookup tables have been generated (they should be stored in version control). You can regenerate them using make in the lookup_tables directory. It takes about a minute to compute them.
References
-
K. Palágyi et al., “A Sequential 3D Thinning Algorithm and Its Medical Applications,” in Information Processing in Medical Imaging, M. F. Insana and R. M. Leahy, Eds., Berlin, Heidelberg: Springer, 2001, pp. 409–415. doi: 10.1007/3-540-45729-1_42.
-
B. Matejek, D. Wei, X. Wang, J. Zhao, K. Palágyi, and H. Pfister, “Synapse-Aware Skeleton Generation for Neural Circuits,” in Medical Image Computing and Computer Assisted Intervention – MICCAI 2019, D. Shen, T. Liu, T. M. Peters, L. H. Staib, C. Essert, S. Zhou, P.-T. Yap, and A. Khan, Eds., Cham: Springer International Publishing, 2019, pp. 227–235. doi: 10.1007/978-3-030-32239-7_26.
-
T. A. Syed, M. Youssef, A. L. Schober, Y. Kubota, K. K. Murai, and C. K. Salmon, “Beyond Neurons: Computer Vision Methods for Analysis of Morphologically Complex Astrocytes,” Frontiers in Computer Science, vol. 6, Sep. 2024, doi: 10.3389/fcomp.2024.1156204.
Metadata
Release files for gaara 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gaara-0.2.0.tar.gz | 247.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gaara-0.2.0-cp313-cp313-macosx_26_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 26.0+ ARM64 | Details |
Total release size: 574.4 kB
Release files / gaara-0.2.0.tar.gz
| Download URL | gaara-0.2.0.tar.gz |
|---|---|
| Size | 247.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b17f0758fbbf7535db6dd5cd786f5c68f2dc9df2b92494ced8f7d8b74a41048
|
|
BLAKE2b-256 checksum How to use checksums |
c97aa588681adaef9169376ff3f264206ffdcaa2ffb182ad93b59c94acf71b69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / gaara-0.2.0-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | gaara-0.2.0-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 326.9 kB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2dab78d7502b91c91bfdfd611783cb5766174af1e0009bfd7e786ee127e6ae93
|
|
BLAKE2b-256 checksum How to use checksums |
108c9233c0a3b312a89faa6a0b07ffcce30f5d68b0d140f057474823ae19f434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|