Several locations can contain the data of a template subject like fsaverage, e.g.\ the package cache and the subjects dir of a FreeSurfer installation, and not all of them necessarily contain the mesh atlas. This function checks the locations in the order in which they are returned by find.subjectsdir.of and returns the first one that actually contains the atlas files. If none contains them, the first location found is returned, so that the caller can report the missing files.
mesh.atlas.resolve.subjects.dir(
subject_id,
atlas = "subcortical",
surface = "subcortical"
)string, the path of a subjects dir.
string. The subject identifier.
string. The atlas name, used to construct the annotation file name.
string. The name of the surface mesh that belongs to the atlas.