This is also known as the 'scanner' or 'native' vox2ras. It is the inverse of the respective ras2vox, see mghheader.ras2vox.

mghheader.vox2ras(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.vox2ras(vdh$header);
#>      [,1] [,2] [,3]      [,4]
#> [1,]   -1    0    0 127.50005
#> [2,]    0    0    1 -98.62726
#> [3,]    0   -1    0  79.09527
#> [4,]    0    0    0   1.00000