Skip to main content

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

Metadata

Release files for cardpy-cmr 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cardpy-cmr 0.1.1
File Size Uploaded Provenance Actions
cardpy_cmr-0.1.1.tar.gz 139.1 kB With provenance Details for cardpy_cmr-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cardpy-cmr 0.1.1
File Interpreter ABI Platform Actions
cardpy_cmr-0.1.1-py3-none-any.whl Python 3 none any Details for cardpy_cmr-0.1.1-py3-none-any.whl

Total release size: 278.9 kB

Release files / cardpy_cmr-0.1.1.tar.gz

Download URL cardpy_cmr-0.1.1.tar.gz
Size 139.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6a2308ab27e4ac3bb3fa28587bf19e5f64d235baf48446c7f61f590aa5c5b957
BLAKE2b-256 checksum
How to use checksums
e26d536d9fd4ee3664b6aa148536b1218e2a28fc32705f2f57a883c438934fe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / cardpy_cmr-0.1.1-py3-none-any.whl

Download URL cardpy_cmr-0.1.1-py3-none-any.whl
Size 139.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c3cfe2a603058c30b35ff424b084445752b76d59f98df169b869cbbda7cc20e
BLAKE2b-256 checksum
How to use checksums
b4ce05cb360a933b0f43481e18e04f46a7a768a563fcaab67e1b130831ec3cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Security for cardpy-cmr 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cardpy_cmr-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page