A high-level framework for cardiac image segmentation post-processing and model creation, built on SimpleITK. Maintained by the Cardiac Electromechanics Research Group (CEMRG) at Imperial College London.
This library depends on pycemrg, which provides the core label management and configuration scaffolding utilities. Both packages should be installed together.
git clone https://github.com/OpenHeartDevelopers/pycemrg.git
git clone https://github.com/OpenHeartDevelopers/pycemrg-image-analysis.gitPreferred: Conda
conda create -n pycemrg-image-analysis python=3.10 -y
conda activate pycemrg-image-analysisOr via python's venv
python -m venv .venv
source .venv/bin/activate # on Windows: .venv\Scripts\activateInstall pycemrg first, then pycemrg-image-analysis:
pip install -e pycemrg/
pip install -e pycemrg-image-analysis/Why editable (
-e)? Editable installs link directly to the source tree so changes to either package take effect immediately without reinstalling.
# Unit tests (no data required)
pytest pycemrg-image-analysis/tests/unit/
# Integration tests (requires segmentation data)
PYCEMRG_TEST_DATA_ROOT=/path/to/your/data pytest pycemrg-image-analysis/tests/integration/
# All tests
pytest pycemrg-image-analysis/Integration tests are skipped automatically when PYCEMRG_TEST_DATA_ROOT is not set.
- Python ≥ 3.10
- SimpleITK ≥ 2.4.0
pycemrg≥ 0.1.0 (see above)
All other dependencies are declared in pyproject.toml and installed automatically by pip.