read.fs.transform.lta: Load transformation matrix from a FreeSurfer linear transform...

Description Usage Arguments Value Note See Also Examples

View source: R/read_fs_transform.R

Description

Load transformation matrix from a FreeSurfer linear transform array (LTA) file.

Usage

1

Arguments

filepath

character string, the full path to the transform file.

Value

4x4 numerical matrix, the transformation matrix

Note

I found no spec for the LTA file format, only example files, so this function should be used with care. If you have a file that is not parsed correctly, please open an issue and attach it.

See Also

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.xfm(), read.fs.transform(), sm0to1(), sm1to0()

Examples

1
2
3
4
    tf_file = system.file("extdata", "talairach.lta",
     package = "freesurferformats", mustWork = TRUE);
    transform = read.fs.transform.lta(tf_file);
    transform$matrix;

freesurferformats documentation built on May 25, 2021, 5:10 p.m.