This function will set all values in morphdata which are *not* part of the label loaded from the file to NA (or whatever is specified by 'masked_data_value'). This is typically used to ignore values which are not part of the cortex (or any other label) during your analysis.
apply.label.to.morphdata(
morphdata,
subjects_dir,
subject_id,
hemi,
label,
masked_data_value = NA
)
numerical vector, the morphometry data for one hemisphere
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.
string. The subject identifier
string, one of 'lh', 'rh' or 'both'. The hemisphere name. Used to construct the names of the annotation and morphometry data files to be loaded.
string, `fs.label` instance, or label vertex data. If a string, interpreted as the file name of the label file, without the hemi part (if any), optionally including the '.label' suffix. E.g., 'cortex.label' or 'cortex' for '?h.cortex.label'.
numerical, the value to set for all morphometry data values of vertices which are *not* part of the label. Defaults to NA.
numerical vector, the masked data.
Other label functions:
apply.labeldata.to.morphdata()
,
subject.lobes()
,
subject.mask()
,
vis.labeldata.on.subject()
,
vis.subject.label()
Other morphometry data functions:
apply.labeldata.to.morphdata()
,
group.morph.native()
,
group.morph.standard()
,
subject.morph.native()
,
subject.morph.standard()