Create 3D visualization of the brain and visualize with modern web browsers
Usage
rave_brain(
subject,
surfaces = "pial",
use_141 = TRUE,
recache = FALSE,
clean_before_cache = FALSE,
compute_template = FALSE,
usetemplateifmissing = FALSE,
include_electrodes = TRUE
)
Arguments
- subject
character, list, or
RAVESubject
instance; for list or other objects, make suresubject$subject_id
is a valid 'RAVE' subject 'ID'- surfaces
one or more brain surface types from
"pial"
,"white"
,"smoothwm"
,"pial-outer-smoothed"
, etc.; checkfreesurfer_brain2
- use_141
whether to use 'AFNI/SUMA' standard 141 brain
- recache
whether to re-calculate cache; only should be used when the original 'FreeSurfer' or 'AFNI/SUMA' files are changed; such as new files are added
- clean_before_cache
whether to clean the original cache before
recache
; only set it to be true if original cached files are corrupted- compute_template
whether to compute template mappings; useful when template mapping with multiple subjects are needed
- usetemplateifmissing
whether to use template brain when the subject brain files are missing. If set to true, then a template (usually 'N27') brain will be displayed as an alternative solution, and electrodes will be rendered according to their
'MNI305'
coordinates, or'VertexNumber'
if given.- include_electrodes
whether to include electrode in the model; default is true
Value
A 'threeBrain'
instance if brain is found or
usetemplateifmissing
is set to true; otherwise returns NULL
Examples
# Please make sure DemoSubject is correctly installed
# The subject is ~1GB from Github
if(interactive()){
brain <- rave_brain("demo/DemoSubject")
if( !is.null(brain) ) { brain$plot() }
}