# dipy_track_pft

## Synopsis

Workflow for Particle Filtering Tracking.

This workflow uses a saved peaks and metrics (PAM) file as input. See [1] for further details about the method.

## Usage

    dipy_track_pft [OPTIONS] pam_files wm_files gm_files csf_files seeding_files

## Input Parameters

- `pam_files`

  Path to the peaks and metrics files. This path may contain

    wildcards to use multiple masks at once.

- `wm_files`

  Path to white matter partial volume estimate for tracking (CMC).

- `gm_files`

  Path to grey matter partial volume estimate for tracking (CMC).

- `csf_files`

  Path to cerebrospinal fluid partial volume estimate for tracking (CMC).

- `seeding_files`

  A binary image showing where we need to seed for tracking.

## General Options

- `--step_size`

  Step size (in mm) used for tracking. (default: 0.2)

- `--seed_density`

  Number of seeds per dimension inside voxel. For example, seed_density of 2 means 8 regularly distributed points in the voxel. And seed density of 1 means 1 point at the center of the voxel. (default: 1)

- `--pmf_threshold`

  Threshold for ODF functions. (default: 0.1)

- `--max_angle`

  Maximum angle between streamline segments (range [0, 90]). (default: 20.0)

- `--sphere_name`

  The sphere used for tracking. If None, the sphere saved in the pam_files is used. For faster tracking, use a smaller sphere (e.g. ‘repulsion200’). (default: None)

- `--pft_back`

  Distance in mm to back track before starting the particle filtering tractography. The total particle filtering tractography distance is equal to back_tracking_dist + front_tracking_dist. (default: 2)

- `--pft_front`

  Distance in mm to run the particle filtering tractography after the the back track distance. The total particle filtering tractography distance is equal to back_tracking_dist + front_tracking_dist. (default: 1)

- `--pft_count`

  Number of particles to use in the particle filter. (default: 15)

- `--pft_max_trial`

  Maximum number of trials to run the particle filtering tractography. (default: 20)

- `--save_seeds`

  If true, save the seeds associated to their streamline in the ‘data_per_streamline’ Tractogram dictionary using ‘seeds’ as the key. (default: False)

- `--min_wm_pve_before_stopping`

  Minimum white matter pve (1 - stopping_criterion.include_map - stopping_criterion.exclude_map) to reach before allowing the tractography to stop. (default: 0)

- `--nbr_threads`

  Number of threads to use for the processing. By default, all available threads will be used. (default: 0)

- `--random_seed`

  Seed for the random number generator, must be >= 0. A value of greater than 0 will all produce the same streamline trajectory for a given seed coordinate. A value of 0 may produces various streamline tracjectories for a given seed coordinate. (default: 1)

- `--seed_buffer_fraction`

  Fraction of the seed buffer to use. A value of 1.0 will use the entire seed buffer. A value of 0.5 will use half of the seed buffer then the other half. a way to reduce memory usage. (default: 1.0)

## Output Options

- `--out_dir`

  Output directory. (default: current directory)

- `--out_tractogram`

  Name of the tractogram file to be saved. (default: tractogram.trk)

## References

[1]

Gabriel Girard, Kevin Whittingstall, Rachid Deriche, and Maxime Descoteaux. Towards quantitative connectivity analysis: reducing tractography biases. NeuroImage, 98:266–278, September 2014. URL: https://doi.org/10.1016/j.neuroimage.2014.04.074, doi:10.1016/j.neuroimage.2014.04.074.

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.