dipy_denoise#

Synopsis#

Denoise diffusion data, selecting the method from the data.

With method='auto', the method is chosen per input file from the number of volumes, the number of diffusion-weighted volumes and an estimate of their SNR. See [1], [2] and [3] for the underlying methods.

An explicit method takes precedence over the selection thresholds: min_volumes, min_directions and min_snr are only read with method='auto'. In that case the criteria are checked in the following order and the first one that matches decides:

  1. fewer than min_volumes volumes: ‘nlmeans’;

  2. fewer than min_directions diffusion-weighted volumes: ‘mppca’;

  3. estimated SNR below min_snr: ‘mppca’;

  4. otherwise ‘patch2self’, or ‘mppca’ when no bvalues_files is given.

Usage#

dipy_denoise [OPTIONS] input_files

Input Parameters#

  • input_files

    Path to the input volumes. This path may contain wildcards to process multiple inputs at once.

General Options#

  • --bvalues_files

    Path to the b-values files, one per input volume. Required for ‘patch2self’ and used by ‘auto’ to separate b0 volumes from diffusion-weighted ones. Without it, ‘auto’ treats every volume as diffusion-weighted. (default: None)

  • --method

    Denoising method: ‘auto’, ‘patch2self’, ‘mppca’ or ‘nlmeans’. Any value other than ‘auto’ forces that method and the min_volumes, min_directions and min_snr thresholds are ignored. (default: auto)

  • --b0_threshold

    Threshold used to find b0 volumes. (default: 50)

  • --min_volumes

    ‘auto’ only. Below this number of volumes, ‘nlmeans’ is used. Checked first: it takes precedence over min_directions and min_snr. (default: 10)

  • --min_directions

    ‘auto’ only. Minimum number of diffusion-weighted volumes for ‘patch2self’; otherwise ‘mppca’ is used. Checked after min_volumes and before min_snr. (default: 30)

  • --min_snr

    ‘auto’ only. Minimum estimated SNR of the diffusion-weighted volumes for ‘patch2self’; otherwise ‘mppca’ is used. Checked last, only when min_volumes and min_directions are both satisfied. (default: 5.0)

  • --patch_radius

    Radius of the local patch for ‘mppca’ and ‘nlmeans’. (default: 2)

  • --model

    Linear model for ‘patch2self’: ‘ols’, ‘ridge’ or ‘lasso’. (default: ols)

  • --ver

    Version of the Patch2Self algorithm, 1 or 3. (default: 3)

  • --clip_negative_vals

    ‘patch2self’ only. Set negative values after denoising to 0. (default: False)

  • --sigma

    ‘nlmeans’ only. Noise standard deviation; 0 estimates it from the data. (default: 0.0)

  • --block_radius

    ‘nlmeans’ only. Block size is 2 x block_radius + 1. (default: 5)

  • --rician

    ‘nlmeans’ only. Assume Rician rather than Gaussian noise. (default: True)

Output Options#

  • --out_dir

    Output directory. (default: current directory)

  • --out_denoised

    Name of the resulting denoised volume. (default: dwi_denoised.nii.gz)

References#

Garyfallidis, E., M. Brett, B. Amirbekian, A. Rokem, S. Van Der Walt, M. Descoteaux, and I. Nimmo-Smith. Dipy, a library for the analysis of diffusion MRI data. Frontiers in Neuroinformatics, 1-18, 2014.