scil_tracking_pft.py

usage: __main__.py [-h] [--algo {det,prob}] [--step STEP_SIZE]
                   [--min_length MIN_LENGTH] [--max_length MAX_LENGTH]
                   [--theta THETA] [--act] [--sfthres SF_THRESHOLD]
                   [--sfthres_init SF_THRESHOLD_INIT]
                   [--sh_basis {descoteaux07,tournier07,descoteaux07_legacy,tournier07_legacy}]
                   [--npv NPV | --nt NT] [--particles PARTICLES]
                   [--back BACK_TRACKING] [--forward FORWARD_TRACKING] [--all]
                   [--seed SEED] [-f] [--save_seeds]
                   [--compress [COMPRESS_TH]] [-v [{DEBUG,INFO,WARNING}]]
                   in_sh in_seed in_map_include map_exclude_file
                   out_tractogram

Local streamline HARDI tractography including Particle Filtering tracking.

WARNING: This script DOES NOT support asymetric FODF input (aFODF).

The tracking is done inside partial volume estimation maps and uses the
particle filtering tractography (PFT) algorithm. See
scil_tracking_pft_maps.py to generate PFT required maps.

Streamlines longer than min_length and shorter than max_length are kept.
The tracking direction is chosen in the aperture cone defined by the
previous tracking direction and the angular constraint.
Default parameters as suggested in [1].

Algo 'det': the maxima of the spherical function (SF) the most closely aligned
to the previous direction.
Algo 'prob': a direction drawn from the empirical distribution function defined
from the SF.

For streamline compression, a rule of thumb is to set it to 0.1mm for the
deterministic algorithm and 0.2mm for probabilitic algorithm.

All the input nifti files must be in isotropic resolution.

Formerly: scil_compute_pft.py

positional arguments:
  in_sh                 Spherical harmonic file (.nii.gz).
  in_seed               Seeding mask (.nii.gz).
  in_map_include        The probability map (.nii.gz) of ending the
                        streamline and including it in the output (CMC, PFT [1])
  map_exclude_file      The probability map (.nii.gz) of ending the
                        streamline and excluding it in the output (CMC, PFT [1]).
  out_tractogram        Tractogram output file (must be .trk or .tck).

Generic options:
  -h, --help            show this help message and exit
  -v [{DEBUG,INFO,WARNING}]
                        Produces verbose output depending on the provided level.
                        Default level is warning, default when using -v is info.

Tracking options:
  --algo {det,prob}     Algorithm to use (must be "det" or "prob"). [prob]
  --step STEP_SIZE      Step size in mm. [0.2]
  --min_length MIN_LENGTH
                        Minimum length of a streamline in mm. [10.0]
  --max_length MAX_LENGTH
                        Maximum length of a streamline in mm. [300.0]
  --theta THETA         Maximum angle between 2 steps. ["det"=45, "prob"=20]
  --act                 If set, uses anatomically-constrained tractography (ACT)
                        instead of continuous map criterion (CMC).
  --sfthres SF_THRESHOLD
                        Spherical function relative threshold. [0.1]
  --sfthres_init SF_THRESHOLD_INIT
                        Spherical function relative threshold value for the
                        initial direction. [0.5]
  --sh_basis {descoteaux07,tournier07,descoteaux07_legacy,tournier07_legacy}
                        Spherical harmonics basis used for the SH coefficients.
                        Must be either descoteaux07', 'tournier07',
                        'descoteaux07_legacy' or 'tournier07_legacy' [['descoteaux07_legacy']]:
                            'descoteaux07'       : SH basis from the Descoteaux et al.
                                                   MRM 2007 paper
                            'tournier07'         : SH basis from the new Tournier et al.
                                                   NeuroImage 2019 paper, as in MRtrix 3.
                            'descoteaux07_legacy': SH basis from the legacy Dipy implementation
                                                   of the Descoteaux et al. MRM 2007 paper
                            'tournier07_legacy'  : SH basis from the legacy Tournier et al.
                                                   NeuroImage 2007 paper.

Seeding options:
  When no option is provided, uses --npv 1.

  --npv NPV             Number of seeds per voxel.
  --nt NT               Total number of seeds to use.

PFT options:
  --particles PARTICLES
                        Number of particles to use for PFT. [15]
  --back BACK_TRACKING  Length of PFT back tracking (mm). [2.0]
  --forward FORWARD_TRACKING
                        Length of PFT forward tracking (mm). [1.0]

Output options:
  --all                 If set, keeps "excluded" streamlines.
                        NOT RECOMMENDED, except for debugging.
  --seed SEED           Random number generator seed.
  -f                    Force overwriting of the output files.
  --save_seeds          If set, save the seeds used for the tracking
                         in the data_per_streamline property.
  --compress [COMPRESS_TH]
                        If set, compress the resulting streamline. Value is the maximum
                        compression distance in mm.[0.1]

References: [1] Girard, G., Whittingstall K., Deriche, R., and Descoteaux, M. (2014). Towards quantitative connectivity analysis: reducing tractography biases. Neuroimage, 98, 266-278.