# dipy_slr

## Synopsis

Streamline-based linear registration.

For efficiency we apply the registration on cluster centroids and remove small clusters. See [1], [2], [3] for further details.

## Usage

    dipy_slr [OPTIONS] static_files moving_files

## Input Parameters

- `static_files`

  List of reference/fixed bundle tractograms.

- `moving_files`

  List of target bundle tractograms that will be moved/registered to match the static bundles.

## General Options

- `--x0`

  rigid, similarity or affine transformation model. (default: affine)

- `--rm_small_clusters`

  Remove clusters that have less than rm_small_clusters. (default: 50)

- `--qbx_thr`

  Thresholds for QuickBundlesX. (default: (40, 30, 20, 15))

- `--num_threads`

  Number of threads to be used for OpenMP parallelization. If None (default) the value of OMP_NUM_THREADS environment variable is used if it is set, otherwise all available threads are used. If < 0 the maximal number of threads minus \(|num_threads + 1|\) is used (enter -1 to use as many threads as possible). 0 raises an error. Only metrics using OpenMP will use this variable. (default: None)

- `--greater_than`

  Keep streamlines that have length greater than this value. (default: 50)

- `--less_than`

  Keep streamlines have length less than this value. (default: 250)

- `--nb_pts`

  Number of points for discretizing each streamline. (default: 20)

- `--progressive`

  True to enable progressive registration. (default: True)

- `--bbox_valid_check`

  Verification for negative voxel coordinates or values above the volume dimensions. (default: True)

- `--remove_invalid_streamlines`

  If True, streamlines outside the volume bounding box are removed before saving. When enabled, `bbox_valid_check` is automatically set to False. (default: False)

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_moved`

  Filename of moved tractogram. (default: moved.trx)

- `--out_affine`

  Filename of affine for SLR transformation. (default: affine.txt)

- `--out_stat_centroids`

  Filename of static centroids. (default: static_centroids.trx)

- `--out_moving_centroids`

  Filename of moving centroids. (default: moving_centroids.trx)

- `--out_moved_centroids`

  Filename of moved centroids. (default: moved_centroids.trx)

## References

[1]

Eleftherios Garyfallidis, Demian Wassermann, and Maxime Descoteaux. Direct native-space fiber bundle alignment for group comparisons. In Joint Annual Meeting ISMRM-ESMRMB 2014 SMRT 23rd Annual Meeting. Milan, Italy, May 2014. International Society for Magnetic Resonance in Medicine (ISMRM).

[2]

Eleftherios Garyfallidis, Omar Ocegueda, Demian Wassermann, and Maxime Descoteaux. Robust and efficient linear registration of white-matter fascicles in the space of streamlines. NeuroImage, 117:124–140, August 2015. URL: https://doi.org/10.1016/j.neuroimage.2015.05.016, doi:10.1016/j.neuroimage.2015.05.016.

[3]

Eleftherios Garyfallidis, Marc-Alexandre Côté, François Rheault, Jasmeen Sidhu, Janice Hau, Laurent Petit, David Fortin, Stephen Cunanne, and Maxime Descoteaux. Recognition of white matter bundles using local and global streamline-based registration and clustering. NeuroImage, 170:283–295, April 2018. Segmenting the Brain. URL: https://doi.org/10.1016/j.neuroimage.2017.07.015, doi:10.1016/j.neuroimage.2017.07.015.

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.