README.md

brainloc

Given a vertex (point) or vertex set (cluster) on the human brain, identify standard space coordinates and find the closest and/or overlapping brain regions according to a brain atlas.

This is currently intended to be used with FreeSurfer standard space templates (fsaverage, fsaverage6, ... fsaverage3).

Fig1 Fig. 1 Left: Vertex 145029 on the left fsaverage surface (at pink marker). Screenshot from the FreeView application that comes with FreeSurfer. Right: Location of MNI coordinate 39 -30 65, the result of mapping fsaverage vertex 145029 to MNI152 space. Screenshot from the MNI - Talairach Tool.

Features

This is an R package that takes as input a vertex index of a FreeSurfer brain mesh in MNI305 space (typically fsaverage) and identifies the location in different coordinate systems and with respect to different brain regions. We use this to report the exact locations of clusters or other differences we find. It can also be used to find the vertex in a brain mesh that is closest to a given coordinate.

Full list of features and functions implementing them

Documentation

Demonstrations

The source code that was used to generate these images is available in this unit test file.

Fig2

Fig. 2 An arbitrary query coordinate (red sphere) and the closest mesh vertex (yellow sphere).

Fig3

Fig. 3 Brain atlas regions with neighborhood relationship. Each sphere representes the centroid of a brain atlas region from the Desikan atlas. Each edge represents a spatial neighborhood relationship between the respective pair of brain regions. Region data from the fsaverage subject.

Installation

It's still rather early, but if you want to try the current version, run the following commands from an R session:

options(repos = c(
    dfspspirit = 'https://dfsp-spirit.r-universe.dev',
    CRAN = 'https://cloud.r-project.org'))

install.packages('brainloc')


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