Skip to main content

A python toolbox for dynamic contrast MRI

Project description

https://github.com/dcmri/dcmri/actions/workflows/pytest-actions.yaml/badge.svg?branch=dev https://codecov.io/gh/plaresmedima/dcmri/graph/badge.svg?token=DLVVTWQ0HA https://img.shields.io/pypi/v/dcmri?label=pypi%20package https://img.shields.io/pypi/dm/dcmri https://img.shields.io/badge/License-Apache_2.0-blue.svg

A python toolbox for dynamic contrast MRI

Installation

pip install dcmri

Typical usage: ROI-based analysis

import dcmri as dc

# Generate some test data
time, aif, roi, _ = dc.fake_tissue(CNR=50)

# Construct a tissue
tissue = dc.Tissue(aif=aif, t=time)

# Train the tissue on the data
tissue.train(time, roi)

# Check the fit to the data
tissue.plot(time, roi)
https://dcmri.org/_images/tissue.png
# Print the fitted parameters
tissue.print_params(round_to=3)
--------------------------------
Free parameters with their stdev
--------------------------------

Blood volume (vb): 0.018 (0.002) mL/cm3
Interstitial volume (vi): 0.174 (0.004) mL/cm3
Permeability-surface area product (PS): 0.002 (0.0) mL/sec/cm3

----------------------------
Fixed and derived parameters
----------------------------

Plasma volume (vp): 0.01 mL/cm3
Interstitial mean transit time (Ti): 74.614 sec

Typical usage: pixel-based analysis

# Generate some test data
n = 128
time, signal, aif, _ = dc.fake_brain(n)

# Construct a tissue array
image = dc.TissueArray(
    (n,n),
    aif=aif,
    t=time,
    kinetics='2CU',
    verbose=1,
)

# Train the tissue array on the data
image.train(time, signal)

# Plot the parameter maps
image.plot(time, signal)
https://dcmri.org/_images/pixel_2cu.png

License

Released under the Apache 2.0 license:

Copyright (C) 2023-2024 dcmri developers

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

dcmri-0.6.19.tar.gz (157.2 kB view details)

Uploaded Source

Built Distribution

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

dcmri-0.6.19-py3-none-any.whl (155.4 kB view details)

Uploaded Python 3

File details

Details for the file dcmri-0.6.19.tar.gz.

File metadata

  • Download URL: dcmri-0.6.19.tar.gz
  • Upload date:
  • Size: 157.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for dcmri-0.6.19.tar.gz
Algorithm Hash digest
SHA256 c4576bbc1cd42bf720aa5969305489abdfa62da6468e0d0fd652940a1d8fb837
MD5 93414953ff2236b3586a5ff7309b5006
BLAKE2b-256 2bea64f12ee43ff8f4d3ea7dcdf882225e9b44709cb85bcac0b89bc20460ea0a

See more details on using hashes here.

File details

Details for the file dcmri-0.6.19-py3-none-any.whl.

File metadata

  • Download URL: dcmri-0.6.19-py3-none-any.whl
  • Upload date:
  • Size: 155.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for dcmri-0.6.19-py3-none-any.whl
Algorithm Hash digest
SHA256 774e1864476184afb0b52aef6898ec21f01aa8b0e82a5bcf4ba483a9df42e6fa
MD5 5d4494bea39b96c6af206648fd40851f
BLAKE2b-256 cfcd97ad5a75e3b0584e891ee411377a2fa51e2f13c735f46d6967838a526ec8

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