CarDpy
A Python toolbox for processing cardiac diffusion tensor imaging (cDTI) data.
For a complete guide, see HOW_TO_USE.md.
Getting Started
Environment Setup
Create the Conda environment:
conda create -n cardpy python=3.14 -y
conda activate cardpy
Installation
Install CarDpy with:
pip install "cardpy-cmr[macos]"
Delete [macos] if not using Mac.
Run the pipeline
There are two ways to run CarDpy:
1. One call with process(). Run the full pipeline from a script:
from cardpy.pipeline import process
from cardpy.config import DEFAULT_CONFIG
import copy
config = copy.deepcopy(DEFAULT_CONFIG)
config["dicom_subpath"] = "02_cDTI/SAX/your_series_folder_name"
results = process("/full/path/to/your/study_folder", config)
The contouring GUI opens during the run. Draw the contours, and the pipeline
finishes on its own. results is a dictionary of the DTI metrics, eigenvectors,
cardiac metrics, and mask. Outputs are also written to a CarDpy_Output/ folder
inside your study folder.
Because each config is an independent dictionary, you can define several and run them in one script (e.g. one per protocol or per patient). This is useful for comparing processing settings on the same data. (Contouring still runs per slice for each.)
For the full list of configuration options, the return-value format, and data setup details, see HOW_TO_USE.md.
2. Notebooks or Script (step-by-step). Write a new script/notebook or use sample notebook. With Sample notebooks start with 01_Data_Processing, then run
02_Post-Processing, using the your data or the sample Healthy_Volunteer_007 dataset.
Associated Publication
Evaluating the Effect of Post-processing Steps When Analyzing Cardiac Diffusion Tensor Data
Cork, T.E., Hannum, A.J., Loecher, M., Perotti, L.E., Ennis, D.B. (2025). Evaluating the Effect of Post-processing Steps When Analyzing Cardiac Diffusion Tensor Data. In: Chabiniok, R., Zou, Q., Hussain, T., Nguyen, H.H., Zaha, V.G., Gusseva, M. (eds) Functional Imaging and Modeling of the Heart (FIMH 2025). Lecture Notes in Computer Science, vol. 15673. Springer, Cham.
DOI: https://doi.org/10.1007/978-3-031-94562-5_13
Completed Tasks
- preliminary pip install
- GUI compatibility on Python 3.12 + 3.14
- config-driven
process()pipeline
Ongoing Tasks
When possible:
- Add automated segmentation GUI with Sascha's model
- windows testing
Action Tasks: 4 - call the GUI an additional time to do a "whole-heart crop" which maybe useful for segmentation - Zooming, drag to resize 5 - GUI updates for usability 3 - manual rejection tool to see all the images and click on one to reject 2 - refine pip install set-up (pypi)
Proposed Merges with Tyler
- New registration WIP
- New Gibb's Ringing Correction
- New data loading algorithm
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cardpy_cmr-0.1.0.tar.gz.
File metadata
- Download URL: cardpy_cmr-0.1.0.tar.gz
- Upload date:
- Size: 127.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a0c45941bd65048484e5307e71797f9e24fac8ddba03e08959e886296ffbbf5
|
|
| MD5 |
2a162bcd4707a7a49b70cbad70fa2eb3
|
|
| BLAKE2b-256 |
8e11bf770e7fe5c0c7153a71996f39402c664545d2322c3812b1a4d87f5865b3
|
Provenance
The following attestation bundles were made for cardpy_cmr-0.1.0.tar.gz:
Publisher:
publish.yml on dzarroug/CarDpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cardpy_cmr-0.1.0.tar.gz -
Subject digest:
3a0c45941bd65048484e5307e71797f9e24fac8ddba03e08959e886296ffbbf5 - Sigstore transparency entry: 2499004417
- Sigstore integration time:
-
Permalink:
dzarroug/CarDpy@fae05d06ec60a2efd73f8365351cf25a1821ff00 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dzarroug
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fae05d06ec60a2efd73f8365351cf25a1821ff00 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cardpy_cmr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cardpy_cmr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 128.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35ed66cb881c6d1c33808f4fc581b119d5c9d8c8e4de826275a536eeae160a1f
|
|
| MD5 |
867c55bb3a3cac843661ad3782378c6e
|
|
| BLAKE2b-256 |
3c5ddebc41ff50b1194b6b3fe373a61fc444e6bef9197387e1cd1811ca780c4b
|
Provenance
The following attestation bundles were made for cardpy_cmr-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on dzarroug/CarDpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cardpy_cmr-0.1.0-py3-none-any.whl -
Subject digest:
35ed66cb881c6d1c33808f4fc581b119d5c9d8c8e4de826275a536eeae160a1f - Sigstore transparency entry: 2499004439
- Sigstore integration time:
-
Permalink:
dzarroug/CarDpy@fae05d06ec60a2efd73f8365351cf25a1821ff00 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dzarroug
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fae05d06ec60a2efd73f8365351cf25a1821ff00 -
Trigger Event:
release
-
Statement type: