Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.
MAKE A CIFTI LABEL FILE FROM A CIFTI FILE
wb_command -cifti-label-import
<input> - the input cifti file
<label-list-file> - text file containing the values and names for labels
<output> - output - the output cifti label file
[-discard-others] - set any values not mentioned in the label list to the
??? label
[-unlabeled-value] - set the value that will be interpreted as unlabeled
<value> - the numeric value for unlabeled (default 0)
[-drop-unused-labels] - remove any unused label values from the label
table
[-hierarchy] - read label name hierarchy from a json file
<file> - the input json file
Creates a cifti label file from a cifti file with label-like values. You
may specify the empty string (use "") for <label-list-file>, which will
be treated as if it is an empty file. The label list file must have the
following format (2 lines per label):
<labelname>
<key> <red> <green> <blue> <alpha>
...
Label names are specified on a separate line from their value and color,
in order to let label names contain spaces. Whitespace is trimmed from
both ends of the label name, but is kept if it is in the middle of a
label. Do not specify the "unlabeled" key in the file, it is assumed
that 0 means not labeled unless -unlabeled-value is specified. The value
of <key> specifies what value in the imported file should be used as this
label (these same key values are also used in the output file). The
values of <red>, <green>, <blue> and <alpha> must be integers from 0 to
255, and will specify the color the label is drawn as (alpha of 255 means
fully opaque, which is probably what you want).
By default, it will create new label names with names like LABEL_5 for
any values encountered that are not mentioned in the list file, specify
-discard-others to instead set these values to the "unlabeled" key.