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.

Semi-quantitative metrics are scalar or volumetric measurements derived directly from the shape of the DCE-MRI signal intensity curve, without fitting a pharmacokinetic model or estimating an Arterial Input Function. Because they require only the raw signal and a stable pre-contrast baseline, they are fast to compute, straightforward to interpret, and consistent across acquisition setups. DCEMapper computes three semi-quantitative parametric maps for each processed dataset: Relative Contrast Enhancement (RCE), Maximum RCE (RCEmax), and Time to Peak RCE (TTP). Each map is saved as a NIfTI file in the derivatives/ folder alongside the source data.

Relative Contrast Enhancement (RCE)

RCE measures how much the signal at each voxel has increased relative to its pre-contrast baseline at every time point. It is the foundational metric from which RCEmax and TTP are derived. Formula:
RCE(x, y, z, t) = ((S(t) - S0) / S0) × 100
Where:
  • S(t) is the signal intensity at voxel (x, y, z) and time index t.
  • S0 is the pre-contrast baseline, computed as the mean signal over the first frame_ini_contrast frames (default: 10).
The result is expressed as a percentage change relative to baseline. Positive values indicate signal enhancement; values near zero indicate no change from baseline. Tissue masking: Before computing RCE, a binary tissue mask is derived from S0. Only voxels where S0 > mean(S0) × 0.8 are processed; all others are set to zero. This suppresses noisy enhancement values in background air or non-tissue regions. Outlier clipping: Values are clipped to the range [0, 500]% to prevent extreme outliers — caused by very low baseline signal or motion artefacts — from dominating colour scales and histogram statistics. Output shape: RCE is a 4D volume with the same spatial and temporal dimensions as the input data, (X, Y, Z, T). The implementation in calculate_rce():
s0_expanded = s0[:, :, :, np.newaxis]
mask_expanded = mask[:, :, :, np.newaxis]

rce = np.where(
    mask_expanded,
    ((data - s0_expanded) / s0_expanded) * 100,
    0
)
rce = np.clip(rce, 0, 500)
The output file is saved as rce_process.nii.gz in the derivatives folder.

Maximum RCE (RCEmax)

RCEmax collapses the temporal dimension of the RCE volume, retaining only the peak enhancement value recorded at each voxel across the entire acquisition. This produces a 3D map that summarises the maximum contrast uptake at every spatial location. Formula:
RCEmax(x, y, z) = max_t( RCE(x, y, z, t) )
Implementation:
rce_max = np.max(rce, axis=3)
Output shape: (X, Y, Z) — a single 3D volume. RCEmax is the most commonly examined parametric map in clinical research workflows because it provides an at-a-glance view of the spatial distribution of contrast uptake intensity across the tissue. Hotspots of high RCEmax typically correspond to areas of elevated vascularity or increased capillary permeability. The output file is saved as rce_max_process.nii.gz in the derivatives folder.

Time to Peak RCE (TTP)

TTP identifies, for each voxel, the time point at which the RCE curve reaches its maximum. It is expressed in seconds by multiplying the frame index of peak RCE by the inter-frame period (frame_period, default: 12.8 s). The map is then masked and normalised to the range [0, 1] for consistent display across datasets. Note on the tissue mask: The mask variable used here is the module-level variable set as a side effect of calculate_rce(). It is not passed as an argument to get_ttp_rce_max_value() — it is populated when calculate_rce() runs and holds the tissue mask (s0 > mean(s0) × 0.8) for the current dataset. This means calculate_rce() must always be called before TTP is computed. Formula:
TTP(x, y, z) = argmax_t( RCE(x, y, z, t) ) × frame_period
Implementation:
max_index = np.argmax(rce, axis=3)
time_to_peak = max_index * frame_period

tto_rce_max = np.where(mask, time_to_peak, 0)
ttp_norm = normalize_img(tto_rce_max)
Output shape: (X, Y, Z) — a single 3D volume, normalised to [0, 1]. The frame_period parameter determines the scaling from frame index to real time. For example, with the default frame_period = 12.8 s and a peak at frame 5:
TTP = 5 × 12.8 = 64.0 s
The output file is saved as tto_rce_max_process.nii.gz in the derivatives folder.

Clinical Interpretation

The three maps together characterise both the magnitude and the kinetics of contrast uptake:
MapHigh valueLow value
RCEmaxStrong peak enhancement — suggests highly vascularised or permeable tissue (e.g., active tumour, inflammation)Weak or absent enhancement — avascular, necrotic, or fibrous tissue
TTPSlow time to peak — gradual, sustained enhancement typical of low-grade or fibrotic tissueFast time to peak — rapid wash-in characteristic of highly vascularised or malignant lesions
RCE (4D)Persistent enhancement at late time points — indicates contrast retention in the extravascular spaceRapid washout after peak — suggests high interstitial pressure or active drainage
When interpreting these maps, it is important to consider the acquisition parameters (temporal resolution, total scan duration) and to compare findings within a consistent protocol, since absolute RCE values depend on scanner gain, flip angle, and TR.
To run the semi-quantitative analysis in DCEMapper, see Parametric Mapping.

Build docs developers (and LLMs) love