dipy_correct_biasfield#

Synopsis#

Correct bias field.

Usage#

dipy_correct_biasfield [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#

  • --bval

    Path to the b-value file. (default: None)

  • --bvec

    Path to the b-vector file. (default: None)

  • --method

    Bias field correction method. Choose from:
    • ‘n4’: DeepN4 bias field correction. See [1] for more details.

    • ‘poly’: Legendre polynomial regression bias correction.

    • ‘bspline’: Cubic B-spline regression bias correction.

    • ‘auto’: Run both poly and bspline, return the one with lower Coefficient of Variation within the brain mask.

    ‘n4’ method is recommended for T1-weighted images. ‘poly’ and ‘bspline’ methods are recommended for diffusion-weighted images. (default: auto)

  • --threshold

    Threshold for cleaning the final correction field in DeepN4 method. (default: 0.5)

  • --use_cuda

    Use CUDA for DeepN4 bias field correction. (default: False)

  • --verbose

    Print verbose output. (default: False)

  • --order

    Maximum Legendre polynomial degree (used with method=’poly’). (default: 3)

  • --n_control_points

    Control grid size per axis (used with method=’bspline’). (default: 8)

  • --pyramid_levels

    Comma-separated downsampling factors for coarse-to-fine pyramid, e.g. ‘4,2,1’ (used with method=’poly’ or ‘bspline’). (default: 4,2,1)

  • --n_iter

    Reweighting iterations per pyramid level (poly/bspline methods). (default: 4)

  • --lambda_reg

    Ridge regularization strength (poly/bspline methods). (default: 0.001)

  • --robust

    Apply Tukey biweight robust reweighting (poly/bspline methods). (default: True)

  • --gradient_weighting

    Apply gradient-based edge suppression (poly/bspline methods). (default: True)

  • --zero_background

    If True, set the saved bias field to 1.0 outside the brain mask, suppressing extrapolation artifacts in the background (poly/bspline methods). (default: False)

Output Options#

  • --out_dir

    Output directory. (default: current directory)

  • --out_corrected

    Name of the corrected volume to be saved. (default: biasfield_corrected.nii.gz)

  • --out_bias_field

    Name of the bias field volume to be saved (poly/bspline methods). (default: bias_field.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.