scil_tractogram_segment_with_bundleseg.py

usage: __main__.py [-h] [--out_dir OUT_DIR]
                   [--minimal_vote_ratio MINIMAL_VOTE_RATIO] [--seed SEED]
                   [--inverse] [--reference REFERENCE] [--processes NBR]
                   [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_tractograms [in_tractograms ...] in_config_file
                   in_directory in_transfo

Compute BundleSeg & supports multi-atlas & multi-parameters (RBx-like).

For a single bundle segmentation, see the lighter version:
>>> scil_tractogram_segment_with_recobundles.py

Hints:
- The model needs to be cleaned and lightweight.
- The transform should come from ANTs: (using the --inverse flag)
  >>> AntsRegistrationSyNQuick.sh -d 3 -m MODEL_REF -f SUBJ_REF
  If you are not sure about the transformation 'direction' you can try
scil_tractogram_segment_with_recobundles.py. See its documentation for
explanation on how to verify the direction.
- The number of folders inside 'models_directories' will increase the number of
runs. Each folder is considered like an atlas and bundles inside will initiate
more BundleSeg executions. The more atlases you have, the more robust the
recognition will be.

Example data and usage available at: https://zenodo.org/record/7950602

For RAM usage, it is recommanded to use this heuristic:
    (size of inputs tractogram (GB) * number of processes) < RAM (GB)
This is important because many instances of data structures are initialized
in parallel and can lead to a RAM overflow.

Formerly: scil_recognize_multi_bundles.py
------------------------------------------------------------------------------------------
Reference:
[1] St-Onge, Etienne, Kurt G. Schilling, and Francois Rheault."BundleSeg: A versatile,
    reliable and reproducible approach to white matter bundle segmentation." International
    Workshop on Computational Diffusion MRI. Cham: Springer Nature Switzerland (2023)
------------------------------------------------------------------------------------------

positional arguments:
  in_tractograms        Input tractogram filename (.trk or .tck).
  in_config_file        Path of the config file (.json)
  in_directory          Path of parent folder of models directories.
                        Each folder inside will be considered as a different atlas.
  in_transfo            Path for the transformation to model space (.txt, .npy or .mat).

options:
  -h, --help            show this help message and exit
  --out_dir OUT_DIR     Path for the output directory [voting_results].
  --minimal_vote_ratio MINIMAL_VOTE_RATIO
                        Streamlines will only be considered for saving if
                        recognized often enough.
                        The ratio is a value between 0 and 1. Ex: If you have 5 input model directories and a minimal_vote_ratio of 0.5, you will need at least 3votes. [0.5]
  --seed SEED           Random number generator seed 0.
  --inverse             Use the inverse transformation.
  --reference REFERENCE
                        Reference anatomy for tck/vtk/fib/dpy file
                        support (.nii or .nii.gz).
  --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.

Scilpy version: 2.0.2