usage: __main__.py [-h] [--nb_pts NB_PTS] [--threshold THRESHOLD]
[--colormap COLORMAP] [--hyperplane] [--use_manhattan]
[--skip_uniformize] [--correlation_thr [CORRELATION_THR]]
[--streamlines_thr [STREAMLINES_THR]]
[--transformation TRANSFORMATION] [--inverse]
[--reference REFERENCE] [-v [{DEBUG,INFO,WARNING,ERROR}]]
[-f]
in_bundles [in_bundles ...] in_centroid out_dir
Compute label image (Nifti) from bundle(s) and centroid(s).
Each voxel will have a label that represents its position along the bundle.
The number of labels will be the same as the centroid's number of points,
unless specified otherwise.
# Single bundle case
This script takes as input a bundle file, a centroid streamline corresponding
to the bundle. It computes label images, where each voxel is assigned the
label of its nearest centroid point. The resulting images represent the
labels, distances between the bundle and centroid.
# Multiple bundle case
When providing multiple (co-registered) bundles, the script will compute a
patch-wise correlation map between density maps as a proxy for confidence in
the bundle's reconstruction.
The correlation map can be thresholded to remove low confidence regions.
It will also compute the labels maps for after concatenating bundles,
ensuring that the labels are spatially consistent between bundles.
# Hyperplane method
The default is to use the euclidian/centerline method, which is fast and
works well for most cases.
The hyperplane method allows for more complex shapes and to split the bundles
into subsections that follow the geometry of each kind of bundle.
However, this method is slower and requires extra quality control to ensure
that the labels are correct. This method requires a centroid file that
contains multiple streamlines.
This method is based on the following paper [1], but was heavily modified
and adapted to work more robustly across datasets.
# Manhattan distance
The default distance (to barycenter of label) is the euclidian distance.
The manhattan distance can be used instead to compute the distance to the
barycenter without stepping out of the mask.
Colormap selection affects tractograms coloring for visualization only.
For detailed information on usage and parameters, please refer to the script's
documentation.
Author:
-------
Francois Rheault
francois.m.rheault@usherbrooke.ca
------------------------------------------------------------------------------------------
Reference:
[1] Neher, Peter, Dusan Hirjak, and Klaus Maier-Hein. "Radiomic tractometry: a
rich and tract-specific class of imaging biomarkers for neuroscience and
medical applications." Research Square (2023).
------------------------------------------------------------------------------------------
positional arguments:
in_bundles Fiber bundle file.
in_centroid Centroid streamline corresponding to bundle.
out_dir Directory to save all mapping and coloring files:
- correlation_map.nii.gz
- session_x/labels_map.nii.gz
- session_x/distance_map.nii.gz
- session_x/correlation_map.nii.gz
- session_x/labels.trk
- session_x/distance.trk
- session_x/correlation.trk
Where session_x is numbered with each bundle.
options:
-h, --help show this help message and exit
--nb_pts NB_PTS Number of divisions for the bundles.
Default is the number of points of the centroid.
--threshold THRESHOLD
Maximum distance between two points to be considered overlapping [0.001 mm].
--colormap COLORMAP Select the colormap for colored trk (data_per_point) [jet].
--hyperplane Use the hyperplane method (multi-centroids) instead of the euclidian method (single-centroid).
--use_manhattan Use the manhattan distance instead of the euclidian distance.
--skip_uniformize Skip uniformization of the bundles orientation.
--correlation_thr [CORRELATION_THR]
Threshold for the correlation map. Only for multi bundle case. [0]
--streamlines_thr [STREAMLINES_THR]
Threshold for the minimum number of streamlines in a voxel to be included [None].
--transformation TRANSFORMATION
Transformation matrix to apply to the centroid
--inverse Inverse the transformation matrix.
--reference REFERENCE
Reference anatomy for tck/vtk/fib/dpy file
support (.nii or .nii.gz).
-v [{DEBUG,INFO,WARNING,ERROR}]
Produces verbose output depending on the provided level.
Default level is warning, default when using -v is info.
-f Force overwriting of the output files.
2.2.2