scil_bundle_uniformize_endpoints

usage: __main__.py [-h]
                   (--axis {x,y,z} | --auto | --centroid tractogram | --target_roi TARGET_ROI [TARGET_ROI ...])
                   [--swap] [--reference REFERENCE]
                   [-v [{DEBUG,INFO,WARNING,ERROR}]] [-f]
                   in_bundle out_bundle

Uniformize streamlines' endpoints according to a defined axis.
Useful for tractometry or models creation.

The --auto option will automatically calculate the main orientation.
If the input bundle is poorly defined, it is possible heuristic will be wrong.

The default is to flip each streamline so their first point's coordinate in the
defined axis is smaller than their last point (--swap does the opposite).

The --target_roi option will use the barycenter of the target mask to define
the axis. The target mask can be a binary mask or an atlas. If an atlas is
used, labels are expected in the form of --target_roi atlas.nii.gz 2 3 5:7.

positional arguments:
  in_bundle             Input path of the tractography file.
  out_bundle            Output path of the uniformized file.

options:
  -h, --help            show this help message and exit
  --axis {x,y,z}        Match endpoints of the streamlines along this axis.
                        SUGGESTION: Commissural = x, Association = y, Projection = z
  --auto                Match endpoints of the streamlines along an automatically determined axis.
  --centroid tractogram
                        Match endpoints of the streamlines to align it to a reference unique streamline (centroid).
  --target_roi TARGET_ROI [TARGET_ROI ...]
                        Provide a target ROI: either a binary mask or a label map and the labels to use.
                        Will align heads to be closest to the mask barycenter.
                        (atlas: if no labels are provided, all labels will be used.
  --swap                Swap head <-> tail convention. Can be useful when the reference is not in RAS.
  --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