if (FALSE) {
# Downloaded CIFTI2 example data from https://www.nitrc.org/projects/cifti/
cifti_example_data_dir <- "~/data/cifti"
cii_file <- file.path(
cifti_example_data_dir,
"Conte69.MyelinAndCorrThickness.32k_fs_LR.dscalar.nii"
)
sf_lh <- freesurferformats::read.fs.surface(file.path(
cifti_example_data_dir,
"Conte69.L.inflated.32k_fs_LR.surf.gii"
))
sf_rh <- freesurferformats::read.fs.surface(file.path(
cifti_example_data_dir,
"Conte69.R.inflated.32k_fs_LR.surf.gii"
))
morph_lh <- read.fs.morph.cifti(cii_file, "lh")
# Myelin data
morph_rh <- read.fs.morph.cifti(cii_file, "rh")
morph2_lh <- read.fs.morph.cifti(cii_file, "lh", 2)
# Cortical Thickness data
morph2_rh <- read.fs.morph.cifti(cii_file, "rh", 2L)
# fsbrain::vis.fs.surface(sf_lh, per_vertex_data = morph_lh);
# fsbrain::vis.fs.surface(sf_rh, per_vertex_data = morph_rh);
# fsbrain::vis.fs.surface(list('lh'=sf_lh, 'rh'=sf_rh),
# per_vertex_data = list('lh'=morph2_lh, 'rh'=morph2_rh));
}
Run the code above in your browser using DataLab