# dipy_extract_volume

## Synopsis

Extracts the required volume from the input 4D file.

## Usage

    dipy_extract_volume [OPTIONS] input_files

## Input Parameters

- `input_files`

  Any number of Nifti1 files

## General Options

- `--vol_idx`

  Indexes of the 3D volume to extract. Index start from 0. You can provide a single index or a range of indexes separated by a dash. For example, to extract volumes 0, 1, and 2, you can use ‘0-2’. You can also provide a list of indexes separated by a comma. For example, to extract volumes 0, 1, 2, 8, 10, 11 and 12 , you can use ‘0-2,8,10-12’. (default: 0)

- `--grouped`

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

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_vol`

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