clusterinfo: Create clusterinfo data structure from files or pre-loaded...

Description Usage Arguments Value See Also

View source: R/clusterinfo.R

Description

Create clusterinfo data structure from files or pre-loaded data.

Usage

1
2
3
4
5
6
7
8
9
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")
)

Arguments

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 freesurferformats::read.fs.morph.

rh_overlay

integer vector, just like lh_overlay, but for the right hemisphere.

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 freesurferformats::read.fs.morph.

rh_statmap

double vector, just like lh_statmap, but for the right hemisphere.

template_subject

character string, the template subject name. Typically 'fsaverage' or 'fsaverage6'. Must be some MNI305 space subject.

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.

Value

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.

See Also

clusterinfo_from_thresholded_overlay If you do have a thresholded t-map instead of one t-map and one cluster overlay map.


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