Use CMTK mat2dof to convert homogeneous affine matrix into CMTK registration
cmtk.mat2dof(m, f = NULL, centre = NULL, Transpose = TRUE, version = FALSE)
5x3 matrix of CMTK registration parameters or logical
Homogenous affine matrix (4x4) last row 0 0 0 1 etc
Output file (optional)
Centre for rotation (optional 3-vector)
the input matrix so that it is read in as it appears on disk
When TRUE, function returns CMTK version number of mat2dof tool
If no output file is supplied, 5x3 params matrix will be returned directly. Otherwise a logical will be returned indicating success or failure at writing to disk.
Transpose is true by default since this results in an R matrix with the transpose in the fourth column being correctly interpreted by cmtk.
Other cmtk-commandline:
cmtk.dof2mat()
Other cmtk-geometry:
affmat2cmtkparams()
,
cmtk.dof2mat()
,
cmtkparams2affmat()