usage: __main__.py [-h] [--blur_radius BLUR_RADIUS] [--step_size STEP_SIZE]
[--min_length m] [--max_length M] [--theta THETA]
[--rk_order K] [--max_invalid_nb_points MAX]
[--keep_last_out_point] [--use_ftODF] [--algo {det,prob}]
[--sphere {repulsion100,repulsion200,repulsion724,symmetric362,symmetric642,symmetric724}]
[--sh_basis {descoteaux07,tournier07,descoteaux07_legacy,tournier07_legacy}]
[--sh_order SH_ORDER] [--sub_sphere SUB_SPHERE]
[--sfthres sf_th] [--sfthres_init sf_th]
[--nb_seeds_per_fibertube NB_SEEDS_PER_FIBERTUBE]
[--nb_fibertubes NB_FIBERTUBES]
[--local_seeding {center,random}]
[--in_custom_seeds IN_CUSTOM_SEEDS] [--rng_seed RNG_SEED]
[--skip SKIP] [--out_config OUT_CONFIG] [--indent INDENT]
[--sort_keys] [-f] [--processes NBR]
[-v [{DEBUG,INFO,WARNING,ERROR}]]
in_fibertubes out_tractogram
Implementation of the fibertube tracking environment using the
architecture of scil_local_tracking_dev.
Contrary to traditional white matter fiber tractography, fibertube
tractography does not rely on a discretized grid of fODFs or peaks. It
directly tracks and reconstructs fibertubes, i.e. streamlines that have an
associated diameter.
When the tracking algorithm is about to select a new direction to propagate
the current streamline, it will build a sphere of radius blur_radius and pick
randomly from all the fibertube segments intersecting with it. The larger the
intersection volume, the more likely a fibertube segment is to be picked and
used as a tracking direction. This makes fibertube tracking inherently
probabilistic.
Possible tracking directions are filtered to respect the aperture cone defined
by the previous tracking direction and the angular constraint.
Seeding is done within the first segment of each fibertube.
To form fibertubes from a set of streamlines, you can use the scripts:
- scil_tractogram_filter_collisions to assign a diameter to each streamline
and remove all colliding fibertubes.
- scil_tractogram_dps_math to assign a diameter without filtering.
For a better understanding of Fibertube Tracking please see:
- docs/source/documentation/fibertube_tracking.rst
positional arguments:
in_fibertubes Path to the tractogram (must be .trk) file
containing fibertubes. They must have their
respective diameter saved as data_per_streamline.
out_tractogram Tractogram output file (must be .trk or .tck).
options:
-h, --help show this help message and exit
--processes NBR Number of sub-processes to start.
Default: [1]
-v [{DEBUG,INFO,WARNING,ERROR}]
Produces verbose output depending on the provided level.
Default level is warning, default when using -v is info.
Tracking options:
--blur_radius BLUR_RADIUS
Radius of the spherical region from which the
algorithm will determine the next direction.
A blur_radius within [0.001, 0.5] is recommended.
[0.1]
--step_size STEP_SIZE
Step size of the tracking algorithm, in mm.
It is recommended to use the same value as the
blur_radius, in the interval [0.001, 0.5]
The step_size should never exceed twice the
blur_radius. [0.1]
--min_length m Minimum length of a streamline in mm. [10.0]
--max_length M Maximum length of a streamline in mm. [300.0]
--theta THETA Maximum angle between 2 steps. If the angle is
too big, streamline is stopped and the
following point is NOT included. [60.0]
--rk_order K The order of the Runge-Kutta integration used
for the step function.
For more information, refer to the note in the
script description. [1]
--max_invalid_nb_points MAX
Maximum number of steps without valid
direction,
ex: No fibertube intersecting the
tracking sphere or max angle is reached.
Default: 0, i.e. do not add points following an invalid direction.
--keep_last_out_point
If set, keep the last point (once out of the
tracking mask) of the streamline. Default: discard
them. This is the default in Dipy too.
Note that points obtained after an invalid direction
(based on the propagator's definition of invalid)
are never added.
ftODF Options:
Options required if you want to perform fibertube tracking using
fibertube orientation distribution (ftODF).
If you're not familiar with these options, please refer to the
fibertube tracking demo.
--use_ftODF If set, will build a fibertube orientation
distribution function at each tracking step. It
also allows the use of the scilpy ODFPropagator
instead of FibertubePropagator.
--algo {det,prob} Algorithm to use with ftODF. If ftODF is
NOT used, this argument is not considered.
[prob]
--sphere {repulsion100,repulsion200,repulsion724,symmetric362,symmetric642,symmetric724}
Dipy sphere; set of possible directions.
Default: [repulsion724]
--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.
--sh_order SH_ORDER Spherical harmonics order at which to build ftODF. [8]
--sub_sphere SUB_SPHERE
Subdivides each face of the sphere into 4^s new faces. [0]
--sfthres sf_th Spherical function relative threshold. [0.1]
--sfthres_init sf_th Spherical function relative threshold value for the
initial direction. [0.5]
Seeding options:
--nb_seeds_per_fibertube NB_SEEDS_PER_FIBERTUBE
The number of seeds generated randomly in the first segment
of each fibertube. The total amount of streamlines will
be [nb_seeds_per_fibertube] * [nb_fibertubes]. [5]
--nb_fibertubes NB_FIBERTUBES
If set, the script will only track a specified
amount of fibers. Otherwise, the entire tractogram
will be tracked. The total amount of streamlines
will be [nb_seeds_per_fibertube] * [nb_fibertubes].
--local_seeding {center,random}
Defines where/how seeds will be placed within a fibertube
origin segment. [random]
--in_custom_seeds IN_CUSTOM_SEEDS
Path to a file containing a list of custom seeding
coordinates (.txt, .mat or .npy). They should be in
VOXMM space. Setting this parameter will ignore all other
seeding parameters.
Random options:
--rng_seed RNG_SEED If set, all random values will be generated
using the specified seed. [0]
--skip SKIP Skip the first N seeds.
Useful if you want to create new streamlines to add to
a previously created tractogram with a fixed --rng_seed.
Ex: If tractogram_1 was created with -nt 1,000,000,
you can create tractogram_2 with
--skip 1,000,000.
Output options:
--out_config OUT_CONFIG
If set, the parameter configuration used for tracking will
be saved at the specified location (must be .json). If not given,
the config will be printed in the console.
-f Force overwriting of the output files.
2.2.2