clusteroverlay_to_annot: Create a hemilist of fs.annot instances from the given...

Description Usage Arguments Value

View source: R/cluster_annot.R

Description

Create a hemilist of fs.annot instances from the given cluster overlay. An fs.annot instance represents a brain surface parcellation, based on a brain atlas. See read.fs.annot for details.

Usage

1
clusteroverlay_to_annot(clusteroverlay, background_code = 0L, hemi = NULL)

Arguments

clusteroverlay

hemilist of integer vectors or a single integer vector of cluster overlay data: a vector that assigns each vertex to an integer class, all vertices belonging to a cluster share the same integer assignment. Non-cluster vertices are assigned the background class, see parameter 'background_code'. One can also pass character strings, which will be interpreted as path to files that should be loaded with freesurferformats::read.fs.morph to get the clusteroverlay. One can also pass a clusterinfo instance, the 'overlay' field will be extracted and used in that case.

background_code

scalar integer, the code in the overlayID data that should be interpreted as background or 'not part of any cluster'.

hemi

character string, ignore unless clusteroverlay is a vector. In that case, it must be 'lh' or 'rh'. Used as a prefix when naming the clusters.

Value

hemilist of freesurferformats::fs.annot instances, each one representing a brain surface parcellation for one hemisphere. Each label in the parcellation (with the exception of the unknown/background region) corresponds to a cluster.


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