scil_connectivity_compute_matrices.py

usage: __main__.py [-h] [--volume OUT_FILE] [--streamline_count OUT_FILE]
                   [--length OUT_FILE] [--similarity IN_FOLDER OUT_FILE]
                   [--maps IN_FOLDER OUT_FILE] [--metrics IN_FILE OUT_FILE]
                   [--lesion_load IN_FILE OUT_DIR]
                   [--min_lesion_vol MIN_LESION_VOL] [--density_weighting]
                   [--no_self_connection] [--include_dps OUT_DIR]
                   [--force_labels_list FORCE_LABELS_LIST] [--processes NBR]
                   [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_hdf5 in_labels

This script computes a variety of measures in the form of connectivity
matrices. This script is made to follow
scil_tractogram_segment_bundles_for_connectivity.py and
uses the same labels list as input.

The script expects a folder containing all relevants bundles following the
naming convention LABEL1_LABEL2.trk and a text file containing the list of
labels that should be part of the matrices. The ordering of labels in the
matrices will follow the same order as the list.
This script only generates matrices in the form of array, does not visualize
or reorder the labels (node).

The parameter --similarity expects a folder with density maps
(LABEL1_LABEL2.nii.gz) following the same naming convention as the input
directory.
The bundles should be averaged version in the same space. This will
compute the weighted-dice between each node and their homologuous average
version.

The parameters --metrics can be used more than once and expect a map (t1, fa,
etc.) in the same space and each will generate a matrix. The average value in
the volume occupied by the bundle will be reported in the matrices nodes.

The parameters --maps can be used more than once and expect a folder with
pre-computed maps (LABEL1_LABEL2.nii.gz) following the same naming convention
as the input directory. Each will generate a matrix. The average non-zeros
value in the map will be reported in the matrices nodes.

The parameters --lesion_load will compute 3 lesion(s) related matrices:
lesion_count.npy, lesion_vol.npy, lesion_sc.npy and put it inside of a
specified folder. They represent the number of lesion, the total volume of
lesion(s) and the total of streamlines going through the lesion(s) for  of each
connection. Each connection can be seen as a 'bundle' and then something
similar to scil_analyse_lesion_load.py is run for each 'bundle'.

Formerly: scil_compute_connectivity.py

positional arguments:
  in_hdf5               Input filename for the hdf5 container (.h5).
                        Obtained from scil_tractogram_segment_bundles_for_connectivity.py.
  in_labels             Labels file name (nifti).
                        This generates a NxN connectivity matrix.

options:
  -h, --help            show this help message and exit
  --volume OUT_FILE     Output file for the volume weighted matrix (.npy).
  --streamline_count OUT_FILE
                        Output file for the streamline count weighted matrix (.npy).
  --length OUT_FILE     Output file for the length weighted matrix (.npy).
  --similarity IN_FOLDER OUT_FILE
                        Input folder containing the averaged bundle density
                        maps (.nii.gz) and output file for the similarity weighted matrix (.npy).
  --maps IN_FOLDER OUT_FILE
                        Input folder containing pre-computed maps (.nii.gz)
                        and output file for the weighted matrix (.npy).
  --metrics IN_FILE OUT_FILE
                        Input (.nii.gz). and output file (.npy) for a metric weighted matrix.
  --lesion_load IN_FILE OUT_DIR
                        Input binary mask (.nii.gz) and output directory for all lesion-related matrices.
  --min_lesion_vol MIN_LESION_VOL
                        Minimum lesion volume in mm3 [7].
  --density_weighting   Use density-weighting for the metric weightedmatrix.
  --no_self_connection  Eliminate the diagonal from the matrices.
  --include_dps OUT_DIR
                        Save matrices from data_per_streamline in the output directory.
                        COMMIT-related values will be summed instead of averaged.
                        Will always overwrite files.
  --force_labels_list FORCE_LABELS_LIST
                        Path to a labels list (.txt) in case of missing labels in the atlas.
  --processes NBR       Number of sub-processes to start.
                        Default: [1]
  -v [{DEBUG,INFO,WARNING}]
                        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.