scil_tractogram_assign_uniform_color.py

usage: __main__.py [-h] (--fill_color str | --dict_colors file.json)
                   (--out_suffix [suffix] | --out_tractogram file.trk)
                   [--reference REFERENCE] [-v [{DEBUG,INFO,WARNING}]] [-f]
                   in_tractograms [in_tractograms ...]

Assign an hexadecimal RGB color to one or more Trackvis (.trk) tractogram.
(If called with .tck, the output will always be .trk, because data_per_point
has no equivalent in tck file.)

Saves the RGB values in the data_per_point 'color' with values
(color_x, color_y, color_z).

The hexadecimal RGB color should be formatted as 0xRRGGBB or "#RRGGBB".

See also: scil_tractogram_assign_custom_color.py

Formerly: scil_assign_uniform_color_to_tractograms.py

positional arguments:
  in_tractograms        Input tractograms (.trk or .tck).

options:
  -h, --help            show this help message and exit
  --reference REFERENCE
                        Reference anatomy for tck/vtk/fib/dpy file
                        support (.nii or .nii.gz).
  -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.

Coloring Methods:
  --fill_color str      Can be hexadecimal (ie. either "#RRGGBB" or 0xRRGGBB).
  --dict_colors file.json
                        Json file: dictionnary mapping each tractogram's basename to a color.
                        Do not put your file's extension in your dict.
                        Same convention as --fill_color.

Output options:
  --out_suffix [suffix]
                        Specify suffix to append to input basename.
                        Mandatory choice if you run this script on multiple tractograms.
                        Mandatory choice with --dict_colors.
                        [None]
  --out_tractogram file.trk
                        Output filename of colored tractogram (.trk).