
Last chance! 50% off unlimited learning
Sale ends in
Given an annotation and a list of values (one per brain region), return data that has the values for each region mapped to all region vertices.
spread.values.over.annot(
annot,
region_value_list,
value_for_unlisted_regions = NaN,
warn_on_unmatched_list_regions = FALSE,
warn_on_unmatched_atlas_regions = FALSE
)
annotation. The result of calling fs.read.annot.
named list of strings. Each name must be a region name from the annotation, and the value must be the value to spread to all region vertices.
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.
logical. Whether to print a warning when a region occurs in the region_value_list that is not part of the given atlas (and the value assigned to this region is thus ignored in the output file and data). Defaults to FALSE.
logical. Whether to print a warning when a region occurs in the atlas that is not part of the given region_value_list (and thus the vertices of the region will be assigned the value 'value_for_unlisted_regions' in the output file and data). Defaults to FALSE.
named list with following entries: "spread_data": a vector of length n, where n is the number of vertices in the annotation. One could write this to an MGH or curv file for visualization. "regions_not_in_annot": list of regions which are not in the annotation, but in the region_value_list. Their values were ignored.
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.hemi()
,
spread.values.over.subject()
,
subject.annot()
,
subject.atlas.agg()
,
subject.label.from.annot()
,
subject.lobes()
# NOT RUN {
fsbrain::download_optional_data();
subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
annot = subject.annot(subjects_dir, 'subject1', 'lh', 'aparc');
region_value_list = list("bankssts"=0.9, "precuneus"=0.7);
morph_like_data =
spread.values.over.annot(annot, region_value_list, value_for_unlisted_regions=0.0);
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab