R/cmtk.R
Use CMTK mat2dof to convert homogeneous affine matrix into CMTK registration
cmtk.mat2dof(m, f = NULL, centre = NULL, Transpose = TRUE, version = FALSE)
m | Homogenous affine matrix (4x4) last row 0 0 0 1 etc |
---|---|
f | Output file (optional) |
centre | Centre for rotation (optional 3-vector) |
Transpose | the input matrix so that it is read in as it appears on disk |
version | When TRUE, function returns CMTK version number of mat2dof tool |
5x3 matrix of CMTK registration parameters or logical
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