Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.
CONVERT AN AFFINE FILE BETWEEN CONVENTIONS wb_command -convert-affine [-from-world] - input is a NIFTI 'world' affine <input> - the input affine [-inverse] - for files that use 'target to source' convention [-from-itk] - input is an ITK matrix <input> - the input affine [-from-flirt] - input is a flirt matrix <input> - the input affine <source-volume> - the source volume used when generating the input affine <target-volume> - the target volume used when generating the input affine [-to-world] - write output as a NIFTI 'world' affine <output> - output - the output affine [-inverse] - write file using 'target to source' convention [-to-itk] - write output as an ITK affine <output> - output - the output affine [-to-flirt] - repeatable - write output as a flirt matrix <output> - output - the output affine <source-volume> - the volume you want to apply the transform to <target-volume> - the target space you want the transformed volume to match NIFTI world matrices can be used directly on mm coordinates via matrix multiplication, they use the NIFTI coordinate system, that is, positive X is right, positive Y is anterior, and positive Z is superior. Note that wb_command assumes that world matrices transform source coordinates to target coordinates, while other tools may use affines that transform target coordinates to source coordinates. The ITK format is used by ANTS. You must specify exactly one -from option, but you may specify multiple -to options, and -to-flirt may be specified more than once.