# dipy_extract_b0

## Synopsis

Extract on or multiple b0 volume from the input 4D file.

## Usage

    dipy_extract_b0 [OPTIONS] input_files bvalues_files

## Input Parameters

- `input_files`

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

- `bvalues_files`

  Path to the bvalues files. This path may contain wildcards to use multiple bvalues files at once.

## General Options

- `--b0_threshold`

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

- `--group_contiguous_b0`

  If True, each contiguous b0 volumes are grouped together. (default: False)

- `--strategy`

  The extraction strategy, of either:

  > - first: select the first b0 found.

  > - all: select them all.

  > - mean: average them.

  When used in conjunction with the batch parameter set to True, the strategy is applied individually on each continuous set found. (default: mean)

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_b0`

  Name of the resulting b0 volume. (default: b0.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.