# dipy_fit_ivim

## Synopsis

Workflow for Intra-voxel Incoherent Motion reconstruction and for computing IVIM metrics.

Performs a IVIM reconstruction [1], [2] on the files by ‘globing’ `input_files` and saves the IVIM metrics in a directory specified by `out_dir`.

## Usage

    dipy_fit_ivim [OPTIONS] input_files bvalues_files bvectors_files mask_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 bvalues files. This path may contain wildcards to use multiple bvalues files at once.

- `mask_files`

  Path to the input masks. This path may contain wildcards to use multiple masks at once. (default: No mask used)

## General Options

- `--split_b_D`

  Value to split the bvals to estimate D for the two-stage process of fitting. (default: 400)

- `--split_b_S0`

  Value to split the bvals to estimate S0 for the two-stage process of fitting. (default: 200)

- `--b0_threshold`

  Threshold value for the b0 bval. (default: 0)

- `--save_metrics`

  List of metrics to save. Possible values: S0_predicted, perfusion_fraction, D_star, D (default: None)

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_S0_predicted`

  Name of the S0 signal estimated to be saved. (default: S0_predicted.nii.gz)

- `--out_perfusion_fraction`

  Name of the estimated volume fractions to be saved. (default: perfusion_fraction.nii.gz)

- `--out_D_star`

  Name of the estimated pseudo-diffusion parameter to be saved. (default: D_star.nii.gz)

- `--out_D`

  Name of the estimated diffusion parameter to be saved. (default: D.nii.gz)

## References

[1]

Denis Le Bihan, Eric Breton, Denis Lallemand, M. L. Aubin, Jacqueline Vignaud, and Maurice Laval-Jeantet. Separation of diffusion and perfusion in intravoxel incoherent motion MR imaging. Radiology, 168(2):497–505, 1988. URL: https://doi.org/10.1148/radiology.168.2.3393671, doi:10.1148/radiology.168.2.3393671.

[2]

Edward O. Stejskal and John E. Tanner. Spin Diffusion Measurements: Spin Echoes in the Presence of a Time-Dependent Field Gradient. The Journal of Chemical Physics, 42(1):288–292, January 1965. doi:http://dx.doi.org/10.1063/1.1695690.

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.