Skip to content

Commit

Permalink
Merge pull request #672 from karanphil/fix_visualize_bundles_unicolor
Browse files Browse the repository at this point in the history
Fixing uniform_coloring in scil_visualize_bunldes.py
  • Loading branch information
arnaudbore authored Mar 6, 2023
2 parents 701ecd7 + 95b9abc commit a9ef1f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/scil_visualize_bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _build_arg_parser():
coloring_group.add_argument('--random_coloring', metavar='SEED', type=int,
help='Assign a random color to bundles.')
coloring_group.add_argument('--uniform_coloring', metavar=('R', 'G', 'B'),
nargs=3,
nargs=3, type=int,
help='Assign a uniform color to streamlines.')
coloring_group.add_argument('--local_coloring', action='store_true',
help='Assign coloring to streamlines '
Expand Down Expand Up @@ -177,7 +177,7 @@ def subsample(list_obj):
color = subsample(
tractogram_gen.data_per_point[args.color_from_points])
elif args.uniform_coloring: # Assign uniform coloring to streamlines
color = tuple(map(int, args.uniform_coloring))
color = tuple(np.asarray(args.uniform_coloring) / 255)
elif args.local_coloring: # Compute coloring from local orientations
# Compute segment orientation
diff = [np.diff(list(s), axis=0) for s in streamlines]
Expand Down

0 comments on commit a9ef1f2

Please sign in to comment.