Description Usage Arguments Value See Also Examples
View source: R/morph_atlas_agg.R
Given an atlas and a list that contains one value for each atlas region, create morphometry data in which all region vertices are assigned the value. Can be used to plot stuff like p-values or effect sizes onto brain regions.
| 1 2 3 4 5 6 7 8 9 | spread.values.over.subject(
  subjects_dir,
  subject_id,
  atlas,
  lh_region_value_list,
  rh_region_value_list,
  value_for_unlisted_regions = NaN,
  silent = FALSE
)
 | 
| 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 | 
| atlas,  | string. The atlas name. E.g., "aparc", "aparc.2009s", or "aparc.DKTatlas". Used to construct the name of the annotation file to be loaded. | 
| lh_region_value_list,  | named list. A list in which the names are atlas regions, and the values are the value to write to all vertices of that region. Applied to the left hemisphere. | 
| rh_region_value_list,  | named list. A list in which the names are atlas regions, and the values are the value to write to all vertices of that region. Applied to the right hemisphere. | 
| value_for_unlisted_regions,  | numeric scalar. The value to assign to vertices which are part of atlas regions that are not listed in region_value_list. Defaults to NaN. | 
| silent | logical, whether to suppress mapping info in case of unnamed region value lists (see 'lh_region_value_list' description). | 
named list with entries 'lh' and 'rh'. Each value is a numeric vector containing the data for the respective hemisphere.
Other atlas functions: 
get.atlas.region.names(),
group.agg.atlas.native(),
group.agg.atlas.standard(),
group.annot(),
group.label.from.annot(),
label.from.annotdata(),
label.to.annot(),
regions.to.ignore(),
spread.values.over.annot(),
spread.values.over.hemi(),
subject.annot(),
subject.atlas.agg(),
subject.label.from.annot(),
subject.lobes()
| 1 2 3 4 5 6 7 |    fsbrain::download_optional_data();
   subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
   lh_region_value_list = list("bankssts"=0.9, "precuneus"=0.7);
   rh_region_value_list = list("bankssts"=0.5);
   morph_like_data =
   spread.values.over.subject(subjects_dir, 'subject1', 'aparc',
   lh_region_value_list, rh_region_value_list);
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.