View source: R/read_fs_transform.R
| read.fs.transform.dat | R Documentation |
Load transformation matrix from a tkregister dat file.
read.fs.transform.dat(filepath)
filepath |
character string, the full path to the transform file. |
an fs.transform instance. A tkregister matrix maps the movable volume (the source) to the target
volume, so space_in is 'voxel' and space_out is 'ras'. It produces RAS coordinates in the tkregister
frame of the target volume, which is why dst states frame = 'tkreg', see
mghheader.vox2ras.tkreg. The other entries of the file are kept as the subject,
in_plane_resolution, between_plane_resolution and intensity fields.
Other header coordinate space:
invert.fs.transform(),
is.fs.transform(),
mghheader.is.ras.valid(),
mghheader.ras2vox(),
mghheader.ras2vox.tkreg(),
mghheader.scanner2tkreg(),
mghheader.tkreg2scanner(),
mghheader.vox2ras(),
mghheader.vox2ras.tkreg(),
print.fs.transform(),
read.fs.transform(),
read.fs.transform.fslmat(),
read.fs.transform.itk(),
read.fs.transform.lta(),
read.fs.transform.xfm(),
sm0to1(),
sm1to0(),
summary.fs.transform(),
transform2lps(),
transform2ras(),
transform2voxel(),
transform2world(),
write.fs.transform(),
write.fs.transform.dat(),
write.fs.transform.fslmat(),
write.fs.transform.itk(),
write.fs.transform.lta(),
write.fs.transform.xfm()
tf_file <- system.file("extdata", "register.dat",
package = "freesurferformats",
mustWork = TRUE
)
transform <- read.fs.transform.dat(tf_file)
transform$matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.