Write out CMTK registration list to folder
write.cmtkreg(reglist, foldername, version = "2.4")
List specifying CMTK registration parameters
Path to registration folder (usually ending in .list)
CMTK version for registration (default 2.4)
Note that transformation in the forward direction (i.e. sample->ref) e.g. as calculated from a set of landmarks where set 1 is the sample is considered an inverse transformation by the IGS software. So in order to use such a transformation as an initial affine with the registration command the switch --initial-inverse must be used specifying the folder name created by this function.
CMTK v2.4 fixed a long-standing bug in affine (de)composition to CMTK params. This resulted in a non-backwards compatible change marked by writing the TYPEDSTREAM as version 2.4. The R code in this package implements both the new and old compose/decompose functions, using the new by default.