View source: R/coords_to_fsaverage.R
vol_coords_to_fsaverage | R Documentation |
Map MNI152 or Colin27 volume coords to fsaverage coords and vertices.
vol_coords_to_fsaverage( coords, surface = "white", fs_home = Sys.getenv("FS_HOME"), silent = TRUE, rf_type = "RF_ANTs", template_type = "FSL_MNI152" )
coords |
nx3 numeric matrix, the source RAS coordinates in the input image which must be in MNI152/Colin27 space. The coords must be within the cortex, otherwise the mapping makes no sense and |
surface |
character string, the fsaverage surface (brain mesh) to load. Must be a valid FreeSurfer surface name like 'white', 'pial', 'orig, 'inflated'. |
fs_home |
character string, path to the FreeSurfer installation. Alternatively, a hemilist of |
silent |
logical, whether to suppress output messages in case of coords outside of cortex. |
rf_type |
the regfusion type to use, one of 'RF_ANTs' or 'RF_M3Z'. |
template_type |
character string, the source template or the space that your input image is in. One of 'MNI152_orig', 'Colin27_orig', 'MNI152_norm', 'Colin27_norm'. |
named list with entries 'fsaverage_vertices': integer vector of fsaverage surface vertex indices, 'hemi': vector of hemi strings for the vertices, 'fsaverage_coords': nx3 numeric matrix of target coordinates, 'query_mni_coords': copy of input parameter coords, 'query_mni_voxels': the voxel indices at the query RAS coords.
Tim Schäfer for the R version, Wu Jianxiao and CBIG for the original Matlab version.
## Not run: mni_ras = c(60.0, 0.0, 10.0) res = vol_coords_to_fsaverage(mni_ras, surface = "white"); res$fsaverage_vertices; # 9092 ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.