This is also known as the 'tkreg2scanner' matrix. Note that this is a RAS-to-RAS matrix. It is the inverse of the 'scanner2tkreg' matrix, see mghheader.scanner2tkreg.

mghheader.tkreg2scanner(header)

Arguments

header

the MGH header

Value

4x4 numerical matrix, the transformation matrix

See also

Examples

    brain_image = system.file("extdata", "brain.mgz",
                               package = "freesurferformats",
                               mustWork = TRUE);
    vdh = read.fs.mgh(brain_image, with_header = TRUE);
    mghheader.tkreg2scanner(vdh$header);
#>      [,1] [,2] [,3]        [,4]
#> [1,]    1    0    0  -0.4999542
#> [2,]    0    1    0  29.3727417
#> [3,]    0    0    1 -48.9047318
#> [4,]    0    0    0   1.0000000