# dipy_extract_shell

## Synopsis

Extract shells from the input 4D file.

## Usage

    dipy_extract_shell [OPTIONS] input_files bvalues_files bvectors_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.

- `bvectors_files`

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

## General Options

- `--bvals_to_extract`

  List of b-values to extract. You can provide a single b-values or a range of b-values separated by a dash. For example, to extract b-values 0, 1, and 2, you can use ‘0-2’. You can also provide a list of b-values separated by a comma. For example, to extract b-values 0, 1, 2, 8, 10, 11 and 12, you can use ‘0-2,8,10-12’. (default: None)

- `--b0_threshold`

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

- `--bvecs_tol`

  Threshold used to check that norm(bvec) = 1 +/- bvecs_tol (default: 0.01)

- `--tol`

  Tolerance range for b-value selection. A value of 20 means volumes with b-values within ±20 units of the specified b-values will be extracted. (default: 20)

- `--group_shells`

  If True, extracted volumes are grouped into a single array. If False, returns a list of separate volumes. (default: True)

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_shell`

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