Skip to main content

µCT image analysis tools for soils and horticultural substrates

Project description

microct-porous-media

Authors: Hadi H. Muhammed, Prof.Dr. Ruediger Anlauf Email: hadi.azizm@gmail.com Email: r.anlauf@hs-osnabrueck.de Faculty of Agricultural Sciences and Landscape Architechture Osnabrueck University of Applied Sciences A Python package for Microcomputed Tomography X-Ray (µCT) image analysis of soils and horticultural substrates, including representative elementary volume (REV) analysis, pore morphology characterization, pore network extraction, pore size distribution, water retention curve estimation, permeability, and saturated hydraulic conductivity determination.

A Python package migrated from six original µCT image-analysis research scripts for soils and horticultural substrates.

Modules

  • rev_xy.py: two-dimensional REV analysis in the x-y plane, recommended for horticultural substrates.
  • rev_xyz.py: three-dimensional REV analysis, recommended for mineral soils or 3D REV assessment.
  • pore_metrics.py: pore volume, pore size, surface density, sphericity, Euler number density (χ), gamma indicator, percolation, network metrics, and CSV/Excel outputs.
  • critical_pore.py: critical pore/throat diameter using PoreSpy network extraction and graph-based percolating-path analysis.
  • pore_size_distribution.py: pore size distribution and simplified water-retention curve from local thickness.
  • permeability.py: permeability and saturated hydraulic conductivity using PoreSpy + OpenPNM + Stokes flow.

Scientific Workflow

The package provides a complete workflow for µCT image analysis:

  1. Image preprocessing and filtering
  2. REV analysis (2D and 3D)
  3. Pore morphology characterization
  4. Critical pore diameter determination
  5. Pore size distribution analysis
  6. Water retention curve estimation
  7. Pore network extraction
  8. Permeability determination
  9. Saturated hydraulic conductivity calculation

Installation

Option 1: Python virtual environment

python -m venv venv
venv\Scripts\activate
pip install -U pip
pip install -e .

Option 2: Conda environment

conda env create -f environment.yml
conda activate microctpm
pip install -e .

Example

from microctpm.permeability import calculate_permeability

result = calculate_permeability(
    image_path="PeatS_2.tif",
    output_dir="outputs/permeability",
    voxel_size=15e-6,
    threshold=85,
)
print(result)

Citation

If you use this package in research, please cite:

Muhammed, H.H., Anlauf, R., Daum, D., Schmitt Rahner, M., and Kuka, K. (2025).

Pore Structure Analysis of Growing Media Using X-Ray Microcomputed Tomography.

Applied Sciences, 15(22), 11886.

https://doi.org/10.3390/app152211886

BibTeX

@article{Muhammed2025MicroCT,
  author = {Muhammed, Hadi Hamaaziz and Anlauf, Ruediger and Daum, Diemo and Schmitt Rahner, Mayka and Kuka, Katrin},
  title = {Pore Structure Analysis of Growing Media Using X-Ray Microcomputed Tomography},
  journal = {Applied Sciences},
  year = {2025},
  volume = {15},
  number = {22},
  pages = {11886},
  doi = {10.3390/app152211886}
}

Relationship to this package

This package implements and extends the image-analysis workflow presented in the publication above, including:

  • Representative Elementary Volume (REV) analysis
  • Pore morphology characterization
  • Pore network extraction
  • Critical pore diameter estimation
  • Water retention curve (WRC) determination
  • Saturated hydraulic conductivity simulation using OpenPNM

Users are encouraged to cite the publication when using the methods implemented in this package.

Important note

This version preserves the original scientific workflows as closely as possible while removing hard-coded paths and automatic execution. Validate all results against the original scripts before public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microct_porous_media-1.0.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microct_porous_media-1.0.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file microct_porous_media-1.0.0.tar.gz.

File metadata

  • Download URL: microct_porous_media-1.0.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for microct_porous_media-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ed705ebd3416e4279ec7259d2e035c83db2135bdebb286d7d3ac24dd5827dab8
MD5 4663af94fd03b0a9d07caabfe1399e0d
BLAKE2b-256 3c21e3883b4180509478ed19c1e36cc620c6accdf92d72311840c3350e4c204e

See more details on using hashes here.

File details

Details for the file microct_porous_media-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for microct_porous_media-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4addbd2a5fa482fbc7ee9f44c9805818173e1000ee1d23c4c4d96cac810d0542
MD5 120ab574d2dd37d4a4c24cc503ae8f23
BLAKE2b-256 80d99669e4ecb7004da1ccafcdb66b741f5686c657e7f66100ea5604849d7087

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page