CEMRG HeartBuilder is a comprehensive Python-based toolkit designed to streamline the creation of personalized whole-heart models, including segmentation handling, meshing, and model post-processing. It integrates external libraries and command-line tools for efficient and reproducible workflows in cardiac modeling.
Key features:
- Modular pipelines for segmentation, meshing, and model creation.
- Seamless integration with external tools using a robust command-runner.
- Fully customizable environment setup via Conda and Poetry.
- Optimized for research applications in cardiac biomechanics and personalized medicine.
conda create -n cemrg-heartbuilder python=3.10 -y
conda activate cemrg-heartbuilderOptional, if you do not have poetry installed, then run
conda install poetry -c conda-forge
Finish by running...
poetry config virtualenvs.create false --local
poetry installpip install -r requirements.txtRun the different numbered scripts in the shell_scripts folder.
## Optional scripts
You can use the optional_scripts.py for some additional helper tasks:
For example:
# python optional_scripts.py relabel $THIS_CASE --image-name IMAGE_NAME --json-old PATH_TO_OLD --json-new PATH_TO_NEW --output-name OUTPUT_NAME [-show]
# python optional_scripts.py geometry $THIS_CASE --seg-name SEG_NAME
# python optional_scripts.py simple_relabel_mesh -msh MESH_PATH -old-json OLD_JSON -new-json NEW_JSON [-old-labels OLD_LABELS] [-new-labels NEW_LABELS] [-print]
# python optional_scripts.py manual_mapping_from_indices -input-pts INPUT_PTS -manual-indices MANUAL_INDICES -value-at-idx VALUE_AT_IDX -output-name OUTPUT_NAME
# python optional_scripts.py export -heart-folder HEART_FOLDER -output-folder OUTPUT_FOLDER [-dry-run]
# python optional_scripts.py basic_report --path-to-mesh PATH_TO_MESH --path-to-tags PATH_TO_TAGS --ep-folder EP_FOLDER --mechanics-folder MECHANICS_FOLDER --case-name CASE_NAME [-append-output-to APPEND_OUTPUT_TO]