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.

DCE-MRI data is inherently noisy: thermal noise, motion artifacts, and Gibbs ringing can all degrade the signal-to-noise ratio and bias downstream quantitative metrics such as relative contrast enhancement (RCE). Preprocessing in DCEMapper addresses two major artifact classes — random image noise and Gibbs ringing — before parametric maps are computed. Denoised data also unlocks the ROI toolbar and enables semi-quantitative processing.

Denoising Filters

DCEMapper exposes three denoising algorithms through Preprocessing → Denoising. Each filter is implemented as a stand-alone function in src/preprocessing/denoise/denoise_filter.py and operates slice-by-slice on the full 4-D NIfTI volume. Only one filter can be selected at a time.

Non-Local Means (skimage)

The non_local_means_denoising() function uses skimage.restoration.denoise_nl_means. This implementation processes each 2-D slice individually, making it suitable for anisotropic volumes where the z-resolution differs markedly from the in-plane resolution.
ParameterDefaultDescription
patch_size3Edge length (in pixels) of the square patches compared during denoising. Larger patches capture more structure but increase computation time.
patch_distance7Maximum search radius (in pixels) when looking for similar patches. A larger value explores more of the image.
h4.5Cut-off distance in grey-level units. Controls the decay of weights assigned to dissimilar patches. Higher values produce smoother results at the cost of detail.

Non-Local Means (Dipy)

The non_local_means_2_denoising() function uses dipy.denoise.nlmeans.nlmeans together with dipy.denoise.noise_estimate.estimate_sigma for automatic noise level estimation. This variant operates on the full 3-D or 4-D volume in one pass and is well-suited to Rician-distributed MRI noise.
ParameterDefaultDescription
N_sigma0Number of coil channels, passed to estimate_sigma. Use 0 for a magnitude image from a single-channel receiver. Increase for parallel imaging reconstructions.
patch_radius1Radius (in voxels) of the patch used for similarity comparison. Patch size = (2 × patch_radius + 1)³.
block_radius2Radius (in voxels) of the search block around each voxel. Block size = (2 × block_radius + 1)³.
ricianTrueWhen True, the filter applies a Rician noise correction to remove the noise floor bias common in magnitude MRI images.

Adaptive Soft Coefficient Matching (ASCM)

The ascm_denoising() function uses dipy.denoise.adaptive_soft_matching.adaptive_soft_matching. ASCM combines two NLM-filtered images (one computed with a small patch, one with a large patch) via an adaptive weighting scheme that preserves edges while suppressing noise aggressively in flat regions.
ParameterDefaultDescription
N_sigma0Number of coil channels for sigma estimation (same meaning as in the Dipy NLM filter above).
patch_radius_small1Patch radius for the first (fine) NLM pass.
patch_radius_large2Patch radius for the second (coarse) NLM pass. A larger value smooths more but may blur edges.
block_radius2Search block radius used for both NLM passes.
ricianTrueApplies Rician correction in both NLM passes before adaptive combination.

Gibbs Artifact Suppression

Gibbs ringing (also called truncation artifact) appears as parallel bands of alternating bright and dark intensity near sharp tissue boundaries. It arises because k-space is always sampled over a finite bandwidth, causing the reconstruction to treat the truncated signal as a periodic function. DCEMapper wraps dipy.denoise.gibbs.gibbs_removal to suppress this artifact. It can be applied:
  • Alone — as the sole preprocessing step, by checking Gibbs artifact suppression without selecting a denoising filter.
  • After denoising — by combining it with any of the three denoising filters above. When both are requested, denoising runs first, then Gibbs suppression is applied to the denoised output.
The corrected image is saved to <original_name>_preproc.nii.gz in the derivatives folder (or overwrites the _preproc.nii.gz produced by denoising if both steps were applied).

Running Preprocessing

1

Load a NIfTI file

Use File → Open → Open NIfTI File (or any other open mode) to load your DCE-MRI volume. See Loading Data for details.
2

Select a denoising filter

Open the Preprocessing menu in the top bar and expand the Denoising submenu. Click one of the three filters to select it (the entry will be checked). Only one filter can be active at a time.
3

Optionally enable Gibbs suppression

Still in the Preprocessing menu, click Gibbs artifact suppression to toggle it on. This step is independent of the denoising filter; you may use it alone or in combination.
4

Click Preprocess

Click Preprocessing → Preprocess. The button is only enabled once at least one option (filter or Gibbs) is checked. DCEMapper runs the selected pipeline on the currently loaded NIfTI file.
5

Review the before/after preview

A comparison dialog shows the original and processed image side by side. Inspect the result:
  • Confirm to accept — the preprocessed volume is saved as <original_name>_preproc.nii.gz and immediately loaded in the viewer.
  • Retry to go back and adjust parameters.
The preprocessed file is saved as <original_name>_preproc.nii.gz inside a derivatives subfolder created automatically next to your source data. For example, if you loaded sub-001_dce.nii.gz, the output will be derivatives/sub-001/sub-001_dce_preproc.nii.gz. Loading this file (or having it created via preprocessing) is what activates the ROI toolbar.

Build docs developers (and LLMs) love