Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Rubick65/dcemapper/llms.txt

Use this file to discover all available pages before exploring further.

Dynamic Contrast Enhancement MRI (DCE-MRI) is a functional imaging technique that tracks the dynamic uptake and washout of an intravenously administered contrast agent — typically a gadolinium-based compound — over time. By capturing how signal intensity evolves at each voxel, DCE-MRI reveals tissue perfusion characteristics and vascular permeability that are invisible on conventional static MRI. It is widely used in oncology (tumour characterisation and treatment response monitoring), neurology (blood-brain barrier assessment), and cardiology (myocardial perfusion).

How DCE-MRI Works

A DCE-MRI acquisition consists of a rapid series of T1-weighted images collected in three phases:
  1. Pre-contrast — Several baseline volumes are acquired before the contrast agent is injected to establish the resting signal level at each voxel.
  2. Contrast arrival — The gadolinium bolus is injected intravenously and the agent is carried into the tissue microvasculature. T1-weighted signal rises sharply as gadolinium shortens the local T1 relaxation time.
  3. Post-contrast (washout) — As the contrast diffuses into and out of the extravascular space, signal intensity decreases at a rate that reflects tissue drainage properties.
The temporal resolution of the acquisition — typically a few seconds per volume — is chosen to capture the rapid initial enhancement. The resulting time-series data encodes the underlying haemodynamic behaviour of each voxel directly in the signal intensity curve.

Data Structure

DCE-MRI data is stored as a 4D NIfTI volume: three spatial dimensions (X, Y, Z) and one temporal dimension (T). DCEMapper loads this volume with nibabel and returns it as a NumPy array of shape (X, Y, Z, T):
import nibabel as nib

img = nib.load("sub-001_acq-dce_run-1_dce.nii.gz")
data = img.get_fdata()   # shape: (X, Y, Z, T)
Two key indexing patterns are used throughout DCEMapper’s processing pipeline:
  • data[:, :, :, t] — the complete 3D volume at time index t, useful for visualising enhancement at a specific moment.
  • data[x, y, z, :] — the signal intensity curve at voxel (x, y, z), the fundamental unit of DCE analysis. Clicking any voxel in the DCEMapper viewer displays this curve as an interactive plot.

Why Semi-Quantitative Analysis?

Full pharmacokinetic modelling of DCE-MRI data (e.g., the Tofts model) estimates physiological parameters such as the volume transfer constant Ktrans and the extravascular extracellular volume fraction ve. However, these models require an Arterial Input Function (AIF) — a measurement of contrast concentration in a feeding artery — which is difficult to measure robustly in practice and introduces significant variability across scanners, field strengths, and acquisition protocols. Semi-quantitative metrics sidestep the AIF requirement entirely. They are derived directly from the shape of the signal intensity curve and are therefore:
  • Simpler to compute — no model fitting or AIF deconvolution is required.
  • More reproducible — results depend only on the acquired signal, not on a separately estimated function.
  • Clinically informative — metrics such as peak enhancement and time-to-peak correlate with tumour grade, vascularity, and treatment response.
DCEMapper computes three semi-quantitative parametric maps — RCE, RCEmax, and Time to Peak — directly from the signal intensity time series. See Semi-Quantitative Metrics for the full mathematical details.

Pre-contrast Baseline (S0)

All semi-quantitative metrics are expressed relative to the pre-contrast baseline signal S0. DCEMapper computes S0 as the mean signal across the first N pre-contrast frames, where N is controlled by the frame_ini_contrast parameter (default: 10):
S0 = np.mean(data[:, :, :, :frame_ini_contrast], axis=3)
A tissue mask is then derived from S0 to exclude background voxels and air from further processing. Voxels where S0 exceeds 80% of the mean S0 value across the volume are considered valid tissue:
mask = S0 > (np.mean(S0) * 0.8)
Voxels outside the mask are set to zero in all output maps, preventing noise in background regions from contaminating the parametric results.
DCEMapper is a research tool intended for scientific investigation of DCE-MRI data. It is not validated as a clinical diagnostic device and must not be used as the sole basis for clinical decisions.

Build docs developers (and LLMs) love