CompactionAnalyzer — Structure Tensor-Based Image Orientation Analysis in Python
Measure local fiber orientation and angular deviation relative to X/Y axes, reference points and lines. Coherency measures the strength of local alignment independently of its direction. Analyze whole images or select regions with a mask from the same image or a second channel.
The cell-relative mode measures fiber alignment and matrix compaction around cells as indirect markers of cell contractility. Other applications include actin stress fibers, cardiomyocytes and aligned tissue structures.
Use the Python API in your own programs, the Saenopy GUI for batch processing, or the browser app for analysis without installation.
Try it online · Download the Saenopy GUI · Documentation and examples
Use it from Python
python -m pip install CompactionAnalyzer
Pass an image path or a NumPy array to analyze_image and select the results you need:
from CompactionAnalyzer import analyze_image
result = analyze_image(
"fibers.tif", # Replace with your image path.
mode="axis_orientation_only",
outputs=["mean_alignment_x", "mean_deviation_x", "mean_coherency"],
sigma_tensor=5, # Pixels.
edge=15,
)
print(result)
The API returns numbers or NumPy maps directly, without writing output files. It also supports cell-relative analysis, optional masks, and point or line references specified in pixel coordinates. See the API reference for modes, outputs and parameters.
Use a graphical interface
- Saenopy GUI: Open Orientation to analyze images or process multiple image pairs as a batch. A standalone Windows EXE is available; no separate Python installation is needed. The GUI is distributed through Saenopy, separately from this Python package.
- Browser app: Load an example or your own images, choose a reference, inspect the results and download plots or arrays. Image analysis runs locally in your browser, one image or image pair at a time.
Both interfaces can compare completed measurements across conditions, including mean alignment, angular deviation, coherency and angle histograms.
Citation
If you use this work, please cite Fiber alignment in 3D collagen networks as a biophysical marker for cell contractility, Böhringer et al., Matrix Biology (2023).
Metadata
Release files for CompactionAnalyzer 1.0.9
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 |
|---|---|---|---|---|
| compactionanalyzer-1.0.9.tar.gz | 104.2 kB | Without provenance | Details for compactionanalyzer-1.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| compactionanalyzer-1.0.9-py3-none-any.whl | Python 3 | none | any | Details for compactionanalyzer-1.0.9-py3-none-any.whl |
Total release size: 183.1 kB
Release files / compactionanalyzer-1.0.9.tar.gz
| Download URL | compactionanalyzer-1.0.9.tar.gz |
|---|---|
| Size | 104.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dab9c6c2bfd46e1560274f7bb92e621aae4af7354f0905d9613e6d1a3a8a92d
|
|
BLAKE2b-256 checksum How to use checksums |
5767b293eeb645001d35efe1c1dbbab69f7e2cef7ce8d0da02f9f49f487796b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / compactionanalyzer-1.0.9-py3-none-any.whl
| Download URL | compactionanalyzer-1.0.9-py3-none-any.whl |
|---|---|
| Size | 78.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa4755f1140e955cbc1f1ee1fff05c620ad670b72ac1d3b27332c8cb70989666
|
|
BLAKE2b-256 checksum How to use checksums |
c613bb1888b2f706c9baa01c80441cd0eaf78714b8f975095510c2e40ffeedaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for CompactionAnalyzer 1.0.9
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.