| Title: | Find Region Names and Coordinates for a Point on the Human Brain |
|---|---|
| Description: | Given a point on the human brain, identify the closest brain regions according to a brain atlas. |
| Authors: | Tim Schäfer [aut, cre] (ORCID: <https://orcid.org/0000-0002-3683-8070>) |
| Maintainer: | Tim Schäfer <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-20 16:05:11 UTC |
| Source: | https://github.com/dfsp-spirit/brainloc |
Create a brain parcellation from custom data.
brainparc(surfaces, annots)brainparc(surfaces, annots)
surfaces |
a named list with a single entry, which must contain a hemilist of fs.surface instances. The name can be anything describing the surface. Typically it is something like 'white', 'pial', or 'inflated' for FreeSurfer surfaces. |
annots |
a named list with at least one entry, all of which must contain a hemilist of minannot (or |
a brainparc instance
A minannot for a surface is just a vector with length equal to the number of surface vertices, that holds one area label per vertex. An area label is an arbitrary character string, but typically a brain region name.
Create a brain parcellation from a subject in a FreeSurfer recon-all output directory
brainparc_fs(subjects_dir, subject_id, surface = "white", atlas = c("aparc"))brainparc_fs(subjects_dir, subject_id, surface = "white", atlas = c("aparc"))
subjects_dir |
string. The FreeSurfer SUBJECTS_DIR, i.e., a directory containing the data for all your subjects, each in a subdir named after the subject identifier. |
subject_id |
string. The subject identifier |
surface |
string. The surface name. E.g., "white", or "pial". Used to construct the name of the surface file to be loaded. |
atlas |
vector of character strings, the brain atlases to use. For this FreeSurfer version, something like "aparc" for the Desikan-Killiani atlas, "aparc.a2009s" for Destrieux, etc. |
a brainparc instance
Given a brain surface and a parcellation into regions, find out which regions are adjacent to each other. A region i is adjacent to another region j if an edge connects any vertex of
i with any vertex of i. Works with brainparcellations.
brainparc_neighbors(bp)brainparc_neighbors(bp)
bp |
a brainparc instance |
hemilist of named integer matrix of regions, expressing whether they are direct neighbors (value 1L) or not (value 0L).
Get details on cluster locations.
cluster_location_details( clusterinfo, silent = getOption("brainloc.silent", default = FALSE), ... )cluster_location_details( clusterinfo, silent = getOption("brainloc.silent", default = FALSE), ... )
clusterinfo |
a clusterinfo instance, see the |
silent |
logical, whether to suppress console messages. |
... |
passed on to |
a data.frame with cluster location details, including MNI152 and Talairach coordinates, Talairach Daemon labels (5 hierarchy levels + full label), and the atlas region name from the first atlas in the brainparc. The column names should be self-explanatory.
A peak is a position in a cluster (a vertex) which is assigned the maximum statsmap value over its neighborhood. The neighborhood definition used by this function is the 1-ring neighborhood on the mesh.
cluster_peaks( clusterinfo, type = "extreme", silent = getOption("brainloc.silent", default = FALSE), ... )cluster_peaks( clusterinfo, type = "extreme", silent = getOption("brainloc.silent", default = FALSE), ... )
clusterinfo |
a clusterinfo instance, see the |
type |
character string, one of 'extreme', 'min' or 'max'. Which cluster value to report. The default of 'extreme' reports the absolutely larger one of the min and the max value and is for the typical use case of |
silent |
whether to suppress printing messages to stdout. |
... |
passed on to |
a data.frame with cluster peak information. The column names should be self-explanatory.
For each cluster in the clusterinfo, compute 1) which atlas regions it overlaps with, and to what percentage the cluster is contained in each region. And, 2), how much of each of the overlapping regions are covered by the cluster. The atlases or surface parcellations to compare the clusters to are take from the clusterinfo$brainparc field.
cluster_region_overlap( clusterinfo, silent = getOption("brainloc.silent", default = FALSE) )cluster_region_overlap( clusterinfo, silent = getOption("brainloc.silent", default = FALSE) )
clusterinfo |
a clusterinfo instance, see the |
silent |
whether to suppress printing messages to stdout. |
a data.frame with cluster overlap information.
Create clusterinfo data structure from files or pre-loaded data.
clusterinfo( lh_overlay, rh_overlay, lh_statmap, rh_statmap, template_subject = "fsaverage", subjects_dir = file.path(getOption("brainloc.fs_home", default = Sys.getenv("FREESURFER_HOME")), "subjects") )clusterinfo( lh_overlay, rh_overlay, lh_statmap, rh_statmap, template_subject = "fsaverage", subjects_dir = file.path(getOption("brainloc.fs_home", default = Sys.getenv("FREESURFER_HOME")), "subjects") )
lh_overlay |
integer vector, the cluster overlay data: one integer per vertex of the left hemisphere. This assigns each vertex to a cluster, and all vertices of one cluster have the same number. Background is typically 1L. If a character string, the parameter will be interpreted as a file path and loaded with |
rh_overlay |
integer vector, just like |
lh_statmap |
double vector, the stats map. Typically a t-value map. Must have one value per vertex. If a character string, the parameter will be interpreted as file path and loaded with |
rh_statmap |
double vector, just like |
template_subject |
character string, the template subject name. Typically 'fsaverage' or 'fsaverage6'. Must be a subject in MNI305 space (i.e., the standard FreeSurfer template space). **Important:** The overlay and statmap data passed to this function must be in the same space as the template_subject (usually MNI305 / fsaverage space). Passing data from a different space (e.g., native subject space) will produce silently incorrect coordinate transforms and atlas region assignments. |
subjects_dir |
character string, file system path to a directory containing the recon-all data for the template_subject. Used to load surfaces and annotations to identify cluster coordinates and atlas regions. |
named list with entries 'overlay', 'statmap', and 'metadata': a clusterinfo data structure. Each of the 'overlay' and 'statmap' keys holds a hemilist of numerical vectors.
clusterinfo_from_thresholded_overlay If you do have a thresholded t-map instead of one t-map and one cluster overlay map.
Create clusterinfo instance from thresholded per-vertex data overlays.
clusterinfo_from_thresholded_overlay( lh_threshmap, rh_threshmap, value_thresholded = 0, template_subject = "fsaverage", subjects_dir = file.path(getOption("brainloc.fs_home", default = Sys.getenv("FREESURFER_HOME")), "subjects") )clusterinfo_from_thresholded_overlay( lh_threshmap, rh_threshmap, value_thresholded = 0, template_subject = "fsaverage", subjects_dir = file.path(getOption("brainloc.fs_home", default = Sys.getenv("FREESURFER_HOME")), "subjects") )
lh_threshmap |
double vector, the stats map. Typically a thresholded t-value map. Must have one value per vertex. The value assigned to vertices that have been removed by the thresholding can be set with parameter 'value_thresholded'. If a character string, the parameter will be interpreted as file path and loaded with |
rh_threshmap |
like |
value_thresholded |
scalar double, the data value of thresholded vertices in the |
template_subject |
character string, the template subject name. Typically 'fsaverage' or 'fsaverage6'. Must be a subject in MNI305 space (i.e., the standard FreeSurfer template space). **Important:** The overlay and statmap data passed to this function must be in the same space as the template_subject (usually MNI305 / fsaverage space). Passing data from a different space (e.g., native subject space) will produce silently incorrect coordinate transforms and atlas region assignments. |
subjects_dir |
character string, file system path to a directory containing the recon-all data for the template_subject. Used to load surfaces and annotations to identify cluster coordinates and atlas regions. |
a clusterinfo instance.
This can only work if there are no clusters which touch each other. I think this can never happen, but we should double-check.
clusterinfo If you do have a separate t-map and a cluster overlay map instead of only a thresholded t-map.
Finds the closest atlas regions according to the brain surface parcellation 'brainparc' for the given query vertex coordinates. The coordinates must be in the surface space of the surface included in the 'brainparc'.
coord_closest_regions( brainparc, coordinate, linkage = "single", distance = "euclidean", silent = getOption("brainloc.silent", default = FALSE), num_regions_to_report = 5L )coord_closest_regions( brainparc, coordinate, linkage = "single", distance = "euclidean", silent = getOption("brainloc.silent", default = FALSE), num_regions_to_report = 5L )
brainparc |
a brain parcellation, see functions like |
coordinate |
|
linkage |
character string, one of |
distance |
character string, one of |
silent |
logical, whether to suppress console messages. |
num_regions_to_report |
scalar integer, the number of closest regions to report (will be reported in increasing order, by distance). Pass |
This is a wrapper around vertex_closest_regions. It first computes the surface vertex closest to the given coordinate (using coord_closest_vertex), then runs vertex_closest_regions with that vertices coordinates.
vertex_closest_regions is faster if you have a vertex index for the surface in 'brainparc' instead of a coordinate.
## Not run: bp = brainparc_fs(fsbrain::fsaverage.path(), "fsaverage", atlas="aparc"); coord_closest_regions(bp, bp$surfaces$white$lh$vertices[1:3,]); ## End(Not run)## Not run: bp = brainparc_fs(fsbrain::fsaverage.path(), "fsaverage", atlas="aparc"); coord_closest_regions(bp, bp$surfaces$white$lh$vertices[1:3,]); ## End(Not run)
Find closest surface vertex to a point, using Euclidean distance.
coord_closest_vertex(coordinate, surfaces)coord_closest_vertex(coordinate, surfaces)
coordinate |
|
surfaces |
|
a data.frame with columns named 'query_x', 'query_y', 'query_z', 'lh_closest_vertex', 'lh_distance', 'rh_closest_vertex', 'rh_distance', 'both_closest_vertex', 'both_distance', 'both_hemi'.
## Not run: bp = brainparc_fs(fsbrain::fsaverage.path(), "fsaverage", atlas="aparc"); query_coords = matrix(seq.int(9), ncol = 3, byrow = TRUE); coord_closest_vertex(query_coords, bp$surfaces$white); ## End(Not run)## Not run: bp = brainparc_fs(fsbrain::fsaverage.path(), "fsaverage", atlas="aparc"); query_coords = matrix(seq.int(9), ncol = 3, byrow = TRUE); coord_closest_vertex(query_coords, bp$surfaces$white); ## End(Not run)
Transform MNI152 coordinates to Talairach space using the piecewise linear transform described by Matthew Brett at http://brainmap.org/training/BrettTransform.html. This is an **approximation** of Talairach space, not the original Talairach atlas space (which is defined by the AC-PC line and a bounding box from a single post-mortem brain). The transform applies different scaling factors above and below the AC line to account for differences between the MNI152 template brain and the Talairach atlas brain.
coord_MNI152_to_talairach(mni152_coords)coord_MNI152_to_talairach(mni152_coords)
mni152_coords |
nx3 numerical matrix of RAS coordinates in MNI152 space. |
nx3 numerical matrix of approximate Talairach coordinates.
When using the output of this function with get_talairach_label to query the Talairach Daemon atlas (talairach.org), be aware that the Daemon is defined in true Talairach space while this transform produces approximate Talairach coordinates. In practice, the Talairach Daemon has fairly coarse labels (lobe-level), so small coordinate discrepancies usually do not affect the result. This approach is widely used in the field (SPM, FSL, etc.).
This implementation is published under the GPL license. See https://github.com/sccn/dipfit/blob/master/mni2tal_matrix.m and https://github.com/sccn/dipfit/blob/master/mni2tal.m for a Matlab implementation of the method. All credits go to Matthew Brett.
mni_coords = matrix(c(10, 12, 14), nrow = 1, ncol = 3, byrow = TRUE); coord_MNI152_to_talairach(mni_coords);mni_coords = matrix(c(10, 12, 14), nrow = 1, ncol = 3, byrow = TRUE); coord_MNI152_to_talairach(mni_coords);
Get info on MNI305 surface coordinate in various coordinate systems.
coord_MNI305_info(coords_mni305, ...)coord_MNI305_info(coords_mni305, ...)
coords_mni305 |
nx3 matrix of coordinates, typically from fsaverage surface vertices. |
... |
Passed on to |
named list with coordinate information (matrices)
Transform MNI305 coords (FreeSurfer fsaverage surface) to MNI152 coordinates.
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")) )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")) )
vertex_coords |
|
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 |
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 |
nx3 numerical matrix of MNI152 coords.
To verify MNI305→MNI152 results, you can click a vertex in FreeView to get its MNI305 coordinates, run them through this function, and compare the MNI152 output with the values shown by the BioImageSuite MNI→Talairach tool at https://bioimagesuiteweb.github.io/bisweb-manual/tools/mni2tal.html. Note that this external tool uses a different Talairach transform (Lacadie et al.) than the one used by coord_MNI152_to_talairach (Brett), so MNI152 values should match but Talairach values may differ slightly.
## 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)## 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)
Return FreeSurfer path.
fs_home()fs_home()
the FreeSurfer path, typically what the environment variable 'FREESURFER_HOME' points to.
This function will stop (i.e., raise an error) if the directory cannot be found. It calls find.freesurferhome internally, see there for more details.
Other FreeSurfer helper functions:
find.freesurferhome(),
get_subjects_dir(),
has_fs()
Get the clusters from a clusterinfo instance.
get_clusters(clusterinfo, hemi = "both")get_clusters(clusterinfo, hemi = "both")
clusterinfo |
a |
hemi |
character string, one of 'lh', 'rh' or 'both'. The hemisphere(s) for which to return the clusters. |
named list, the keys are the cluster names, and the values are integer vectors defining the member vertices.
Try a number of ways to find the subjects dir, using environment variables and knowledge on common installation paths of FreeSurfer.
get_subjects_dir( mustWork = TRUE, allow_download = FALSE, accept_freesurfer_license = FALSE )get_subjects_dir( mustWork = TRUE, allow_download = FALSE, accept_freesurfer_license = FALSE )
mustWork |
whether to stop if no subjects_dir can be found. |
allow_download |
logical, whether to allow downloading the data in case it is not found locally. |
accept_freesurfer_license |
logical, whether you want to also download fsaverage and fsaverage3, and accept the FreeSurfer license for fsaverage and fsaverage3, available at https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense. Defaults to FALSE. If FALSE, nothing will be downloaded. |
character string, the subjects directory. If mustWork is FALSE, it will return NULL if no directory was found. If mustWork is TRUE and nothing is found, it stops.
Other FreeSurfer helper functions:
find.freesurferhome(),
fs_home(),
has_fs()
Extract the surface hemilist from a brainparc.
get_surface(brainparc)get_surface(brainparc)
brainparc |
a |
hemilist of fs.surface instances.
Other brainparc accessors:
get_surface_coords()
Extract the vertex coordinates from the brainparc surface.
get_surface_coords(brainparc, vertices, hemis)get_surface_coords(brainparc, vertices, hemis)
brainparc |
a |
vertices |
integer vector, the query vertex indices. |
hemis |
vector of character string, the hemispheres for the query vertices. Length must match, length of 1 will be recycled to all vertices. |
numerical nx3 matrix, the coordindates for the x query vertices.
Other brainparc accessors:
get_surface()
talairach.org files.Retrieve Talairach labels for Talairach coordinates from talairach.org files.
get_talairach_label( tal_coords, talairach_vol_file = NULL, lookup_table_file = NULL, check_oob = TRUE )get_talairach_label( tal_coords, talairach_vol_file = NULL, lookup_table_file = NULL, check_oob = TRUE )
tal_coords |
|
talairach_vol_file |
optional character string, the path to the NIFTI Talairach label volume file from |
lookup_table_file |
optional character string, the path to the Talairach label index text file from |
check_oob |
logical, whether to check for out-of-bounds voxels, which do not fall into the NIFTI volume during the computation (because the talairach coordinate is a bit off). Checking is slower, but if such coordinates exist in your query and you do not check, the function will stop with an error. Leave this alone if in doubt. |
data.frame describing labels for the coordinates. The following columns are included: cx,cy,cz: the query coordinates, as given in parameter 'tal_coords'. v1,v2,v3: The voxel indices in the talairach.nii file that map to the query coordinates. label_lvl1,...,label_lvl5: the label strings for the location, in a hierarchy with 5 levels (parsed from label_full for you as a convenience). label_full: The raw, full label string for the location. A star * means that no label name is available for the given coordinate at this level.
If you leave the file path arguments talairach_vol_file and lookup_table_file at NULL, the files will be downloaded from talairach.org automatically if that is possible (e.g., you have a working internet connection and the server is up). If it fails, the function will stop in the next step.
When using this function or the Talairach.org data in your research, please cite the following two publications: Lancaster JL, Woldorff MG, Parsons LM, Liotti M, Freitas CS, Rainey L, Kochunov PV, Nickerson D, Mikiten SA, Fox PT, "Automated Talairach Atlas labels for functional brain mapping". Human Brain Mapping 10:120-131, 2000. and Lancaster JL, Rainey LH, Summerlin JL, Freitas CS, Fox PT, Evans AC, Toga AW, Mazziotta JC. Automated labeling of the human brain: A preliminary report on the development and evaluation of a forward-transform method. Hum Brain Mapp 5, 238-242, 1997.
Currently it is not possible to search 'in the vicinity' to compensate for a slightly inaccurate query coordinate that may be outside of the brain by just a tiny bit. Please open an issue if you feel this is required.
## Not run: query_tal_coords = matrix(seq.int(15), nrow=5, ncol=3); get_talairach_label(query_tal_coords); ## End(Not run)## Not run: query_tal_coords = matrix(seq.int(15), nrow=5, ncol=3); get_talairach_label(query_tal_coords); ## End(Not run)
Check whether a FreeSurfer installation can be found on the system.
has_fs()has_fs()
logical, whether a FreeSurfer installation was found.
Other FreeSurfer helper functions:
find.freesurferhome(),
fs_home(),
get_subjects_dir()
A hemilist is a named list which has at least one of the following fields: lh and rh. The fields can store arbitrary values.
hemilist(lh_data = NULL, rh_data = NULL)hemilist(lh_data = NULL, rh_data = NULL)
lh_data |
any R object, the lh value. |
rh_data |
any R object, the rh value. |
a hemilist
This function is trivial and mainly exists to document what a hemilist is (so this explanation can be linked to from the documentation of other functions which use the concept).
Other hemilist functions:
hemilist.wrap(),
is.hemilist()
Check whether object is a brainparc instance.
is.brainparc(x)is.brainparc(x)
x |
any 'R' object |
logical, TRUE if parameter x is a brainparc instance (that is, has "brainparc" in its classes) and FALSE otherwise.
Check whether x is a clusterinfo instance.
is.clusterinfo(x)is.clusterinfo(x)
x |
any R object |
logical, whether x is a clusterinfo instance.
Given a brain volume with integer labels as voxel values and a suitable colorLUT, extract the region names as a named list.
name_regions( volatlas, colorlut, ignore_not_in_lut = FALSE, warn_not_in_lut = FALSE )name_regions( volatlas, colorlut, ignore_not_in_lut = FALSE, warn_not_in_lut = FALSE )
volatlas |
3d integer array, the brain volume segmentation. Can be an |
colorlut |
a color lookup table data.frame, as returned by |
ignore_not_in_lut |
logical, whether to ignore regions that are not found in the colorLUT. If TRUE, the regions will not appear in the named output list. If FALSE, they will appear as 'region_x', where 'x' is the integer region code in the volatlas. |
warn_not_in_lut |
logical, whether to print a warning if some regions of the volume do not occur in the colorLUT. |
named list, the keys are character strings: the region names from the colorLUT, and the values are integers: the region codes from the volume.
Print description of a brainparc instance (S3).
## S3 method for class 'brainparc' print(x, ...)## S3 method for class 'brainparc' print(x, ...)
x |
brainparc instance, with class 'brainparc'. |
... |
further arguments passed to or from other methods. |
Called for side effects.
Find center of mass of regions in a brain volume segmentation.
segmentation_centers(volatlas, named_regions = NULL, vox2ras = diag(4))segmentation_centers(volatlas, named_regions = NULL, vox2ras = diag(4))
volatlas |
3d integer array, the brain volume segmentation. Can be an |
named_regions |
the regions to consider, a named list where the keys are character strings: the region names from the colorLUT, and the values are integers: the region codes from the volume. See |
vox2ras |
4x4 numerical matrix, the voxel to RAS coordinate transformation matrix for the volume. If NULL and volatlas is an fs.volume instance, the function will try to extract it from the volume header. The default is the identity matrix, which will return voxel indices instead of RAS coordinates. |
data.frame with region names and the center of mass x, y and z coordinates for the regions.
## Not run: if(has_fs()) { fsh = fs_home(); lutfile = file.path(fsh, "FreeSurferColorLUT.txt"); segfile = file.path(fsh, 'subjects', 'fsaverage', 'mri', 'aseg.mgz'); named_regions = name_regions(segfile, lutfile); named_regions$Unknown = NULL; # Ignore an atlas region. sc = segmentation_centers(segfile, named_regions); regions_distance_matrix = dist(sc); } ## End(Not run)## Not run: if(has_fs()) { fsh = fs_home(); lutfile = file.path(fsh, "FreeSurferColorLUT.txt"); segfile = file.path(fsh, 'subjects', 'fsaverage', 'mri', 'aseg.mgz'); named_regions = name_regions(segfile, lutfile); named_regions$Unknown = NULL; # Ignore an atlas region. sc = segmentation_centers(segfile, named_regions); regions_distance_matrix = dist(sc); } ## End(Not run)
Finds the closest atlas regions according to the brain surface parcellation 'brainparc' for the given query vertices.
vertex_closest_regions( brainparc, vertices, hemis, linkage = "single", distance = "euclidean", silent = getOption("brainloc.silent", default = FALSE), num_regions_to_report = 5L )vertex_closest_regions( brainparc, vertices, hemis, linkage = "single", distance = "euclidean", silent = getOption("brainloc.silent", default = FALSE), num_regions_to_report = 5L )
brainparc |
a brain parcellation, see functions like |
vertices |
integer vector, the query vertex indices (from the surface in the |
hemis |
character string vector, the hemispheres for each of the |
linkage |
character string, one of |
distance |
character string, one of |
silent |
logical, whether to suppress console messages. |
num_regions_to_report |
scalar integer, the number of closest regions to report (will be reported in increasing order, by distance). Pass |
a data.frame, the column names should be obvious.
coord_closest_regions if you have a coordinate (on or near the surface) instead of a vertex.
## Not run: bp = brainparc_fs(get_subjects_dir(), "fsaverage", atlas="aparc"); vertex_closest_regions(bp, vertices=c(10, 20), hemis=c("lh", "rh")); ## End(Not run)## Not run: bp = brainparc_fs(get_subjects_dir(), "fsaverage", atlas="aparc"); vertex_closest_regions(bp, vertices=c(10, 20), hemis=c("lh", "rh")); ## End(Not run)
Find regions for vertices in all brainparc atlases.
vertex_regions(brainparc, vertices, hemis)vertex_regions(brainparc, vertices, hemis)
brainparc |
a brain parcellation, see functions like |
vertices |
integer vector, the query vertex indices (from the surface in the |
hemis |
character string vector, the hemispheres for each of the |
a data.frame, the column names should be obvious.
vertex_closest_regions to compute distance to all regions.
## Not run: bp = brainparc_fs(get_subjects_dir(), "fsaverage", atlas="aparc"); vertex_region(bp, vertices=c(10, 20), hemis=c("lh", "rh")); ## End(Not run)## Not run: bp = brainparc_fs(get_subjects_dir(), "fsaverage", atlas="aparc"); vertex_region(bp, vertices=c(10, 20), hemis=c("lh", "rh")); ## End(Not run)