Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.
TRANSFORM AND RESAMPLE A LABEL VOLUME FILE
wb_command -volume-label-resample
<volume-in> - volume to resample
<volume-space> - a volume file in the volume space you want for the
output
<volume-out> - output - the output volume
[-smooth-edges] - apply smoothing to the ROIs between resampling and
indexmax operations, increases boundary smoothness at the cost of
fidelity
<kernel-size> - smoothing amount to use, gaussian sigma in mm
[-fwhm] - use specified kernel size as full width at half maximum,
rather than sigma
[-unlabeled-mask] - instead of treating the 'unlabeled' voxels as just
another label, treat them as a mask
[-affine] - repeatable - add an affine transform
<affine> - the affine file to use
[-flirt] - MUST be used if affine is a flirt affine
<source-volume> - the source volume used when generating the affine
<target-volume> - the target volume used when generating the affine
[-affine-series] - repeatable - add an independent affine per-frame
<affine-series> - text file containing 12 or 16 numbers per line, each
being a row-major flattened affine
[-flirt] - MUST be used if the affines are flirt affines
<source-volume> - the source volume used when generating the affine
<target-volume> - the target volume used when generating the affine
[-warp] - repeatable - add a nonlinear warpfield transform
<warpfield> - the warpfield file
[-fnirt] - MUST be used if using a fnirt warpfield
<source-volume> - the source volume used when generating the
warpfield
Resample a label volume file with an arbitrary list of transformations.
You may specify -affine, -warp, and -affine-series multiple times each,
and they will be used in the order specified. For instance, for rigid
motion correction followed by nonlinear atlas registration, specify
-affine-series first, then -warp.
Internally, this command makes an ROI for each label, resamples them with
TRILINEAR, and then takes the label from the ROI with the largest value
at each voxel. By default, unlabeled voxels are treated as if they were
a label, use -unlabeled-mask to instead treat them as a separate mask.
Using mask behavior can reduce an effect where a junction between labels
that is next to unlabeled voxels will 'pinch inwards', particularly when
using -smooth-edges.