coord_MNI305_to_MNI152: Transform MNI305 coords (FreeSurfer fsaverage surface) to...

Description Usage Arguments Value Note Examples

View source: R/coords_to_talairach.R

Description

Transform MNI305 coords (FreeSurfer fsaverage surface) to MNI152 coordinates.

Usage

1
2
3
4
5
6
coord_MNI305_to_MNI152(
  vertex_coords,
  method = getOption("brainloc.method_MNI305_to_from_MNI152", default = "linear"),
  surface = "orig",
  fs_home = getOption("brainloc.fs_home", default = Sys.getenv("FREESURFER_HOME"))
)

Arguments

vertex_coords

nx3 numerical matrix of MNI305 surface RAS coordinates, typically from fsaverage surface vertices.

method

character string, the method to use to map from MNI305 to MNI152 along the way. One of "best_available", "regfusionr", and "linear".

surface

optional character string or hemilist of surfaces, the surface to use to find a surface vertex close to the given query coordinates. Only used if 'method' results in regfusionr being used. Passed on to regfusionrregfusionr::mni305_coords_to_mni152_coords.

fs_home

optional character string, the path to the FREESURFER_HOME directory from which to load the surfaces from the 'surface' parameter. Only used if 'method' results in regfusionr being used. Passed on to regfusionrregfusionr::mni305_coords_to_mni152_coords.

Value

nx3 numerical matrix of MNI152 coords.

Note

One can check that the results are okay by clicking a vertex in FreeView, using the displayed MNI305 coordinates as input to this function, and looking up the reported MNI152 coordinates at https://bioimagesuiteweb.github.io/webapp/mni2tal.html.

Examples

1
2
3
4
5
6
## Not run: 
# Get MNI152 coordinates for first 3 fsaverage lh vertices:
surf = freesurferformats::read.fs.surface("/opt/freesurfer/subjects/fsaverage/surf/lh.white");
coord_MNI305_to_MNI152(surf$vertices[1:3, ]);

## End(Not run)

dfsp-spirit/brainloc documentation built on Jan. 28, 2022, 12:25 p.m.