if (FALSE) {
fsbrain::download_optional_data();
fsbrain::download_fsaverage(accept_freesurfer_license=TRUE);
subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
# Get coloredmeshes without opening a window:
cm = vis.subject.annot(subjects_dir, 'subject1', 'aparc', 'both',
rglactions=list('no_vis'=TRUE));
# Create an interactive WebGL widget:
widget = vis.rglwidget(cm);
# In RMarkdown, just print it:
# widget
# In Shiny, use rglwidgetOutput / renderRglwidget (see the shiny demo app).
}
Run the code above in your browser using DataLab