scil_viz_bundle.py

usage: __main__.py [-h]
                   [--random_coloring SEED | --uniform_coloring R G B | --local_coloring | --color_dict JSON | --color_from_streamlines KEY | --color_from_points KEY]
                   [--shape {line,tube}] [--width WIDTH]
                   [--subsample SUBSAMPLE] [--downsample DOWNSAMPLE]
                   [--background R G B] [-v [{DEBUG,INFO,WARNING}]]
                   in_bundles [in_bundles ...]

Visualize bundles.

Example usages:

# Visualize streamlines as tubes, each bundle with a different color
>>> scil_viz_bundle.py path_to_bundles/ --shape tube --random_coloring 1337

# Visualize a tractogram with each streamlines drawn as lines, colored with
# their local orientation, but only load 1 in 10 streamlines
>>> scil_viz_bundle.py tractogram.trk --shape line --subsample 10

# Visualize CSTs as large tubes and color them from a list of colors in a file
>>> scil_viz_bundle.py path_to_bundles/CST_* --width 0.5
    --color_dict colors.json

positional arguments:
  in_bundles            List of tractography files supported by nibabel.

options:
  -h, --help            show this help message and exit
  --shape {line,tube}   Display streamlines either as lines or tubes.
                        [Default: tube]
  --width WIDTH         Width of tubes or lines representing streamlines
                        [Default: 0.25]
  --subsample SUBSAMPLE
                        Only load 1 in N streamlines.
                        [Default: 1]
  --downsample DOWNSAMPLE
                        Downsample streamlines to N points.
                        [Default: None]
  --background R G B    RBG values [0, 255] of the color of the background.
                        [Default: [0, 0, 0]]
  -v [{DEBUG,INFO,WARNING}]
                        Produces verbose output depending on the provided level.
                        Default level is warning, default when using -v is info.

Colouring options:
  --random_coloring SEED
                        Assign a random color to bundles.
  --uniform_coloring R G B
                        Assign a uniform color to streamlines.
  --local_coloring      Assign coloring to streamlines depending on their local orientations.
  --color_dict JSON     JSON file containing colors for each bundle.
                        Bundle filenames are indicated as  keys and colors as values.
                        A 'default'  key and value can be included.
  --color_from_streamlines KEY
                        Extract a color per streamline from the data_per_streamline property of the tractogram at the specified key.
  --color_from_points KEY
                        Extract a color per point from the data_per_point property of the tractogram at the specified key.