# 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.

    - ‘b0’: B0 bias field correction via normalization.

  ‘n4’ method is recommended for T1-weighted images where ‘b0’ method is recommended for diffusion-weighted images. (default: n4)

- `--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)

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_corrected`

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

## References

[1]

Praitayini Kanakaraj, Tianyuan Yao, Leon Y. Cai, Ho Hin Lee, Nancy R. Newlin, Michael E. Kim, Chenyu Gao, Kimberly R. Pechman, Derek Archer, Timothy Hohman, Angela Jefferson, Lori L. Beason-Held, Susan M. Resnick, Eleftherios Garyfallidis, Adam Anderson, Kurt G. Schilling, Bennett A. Landman, Daniel Moyer, The Alzheimer’s Disease Neuroimaging Initiative (ADNI), and The BIOCARD Study Team. DeepN4: Learning N4ITK Bias Field Correction for T1-weighted Images. Neuroinformatics, 22(2):193–205, April 2024. URL: https://doi.org/10.1007/s12021-024-09655-9, doi:10.1007/s12021-024-09655-9.

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.