Using Workbench Command

Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.

Full Documentation:

Documentation Home
IMPORT A LABEL VOLUME TO WORKBENCH FORMAT
   wb_command -volume-label-import
      <input> - the input volume file
      <label-list-file> - text file containing the values and names for labels
      <output> - output - the output workbench label volume

      [-discard-others] - set any voxels with 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)

      [-subvolume] - select a single subvolume to import
         <subvol> - the subvolume number or name

      [-drop-unused-labels] - remove any unused label values from the label
         table

      Creates a label volume from an integer-valued volume file.  The label
      name and color information is stored in the volume header in a nifti
      extension, with a similar format as in caret5, see -volume-help.  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.