brainspace.utils.parcellation.relabel_consecutive

brainspace.utils.parcellation.relabel_consecutive(lab, start_from=0)[source]

Relabel array with consecutive values.

Parameters:
  • lab (ndarray) – Array to relabel.
  • start_from (int, optional) – Initial label. The default is 0.
Returns:

new_lab (ndarray) – Array with consecutive labels.