Load transformation matrix from an XFM file.
read.fs.transform.xfm(filepath)
filepath | character string, the full path to the transform file. |
---|
4x4 numerical matrix, the transformation matrix
Currently this function has been tested with linear transformation files only, all others are unsupported.
Other header coordinate space:
mghheader.is.ras.valid()
,
mghheader.ras2vox.tkreg()
,
mghheader.ras2vox()
,
mghheader.scanner2tkreg()
,
mghheader.tkreg2scanner()
,
mghheader.vox2ras.tkreg()
,
mghheader.vox2ras()
,
read.fs.transform.dat()
,
read.fs.transform.lta()
,
read.fs.transform()
,
sm0to1()
,
sm1to0()
tf_file = system.file("extdata", "talairach.xfm",
package = "freesurferformats",
mustWork = TRUE);
transform = read.fs.transform.xfm(tf_file);
transform$matrix;
#> [,1] [,2] [,3] [,4]
#> [1,] 1.111536 0.040948 0.012535 -0.803558
#> [2,] -0.029730 0.981154 0.342306 -19.558083
#> [3,] 0.022961 -0.452588 1.111222 10.044540
#> [4,] 0.000000 0.000000 0.000000 1.000000