if (is_not_cran()) {
mesh <- vcg_isosurface(left_hippocampus_mask)
# removing a face leaves a hole bounded by three edges
mesh$it <- mesh$it[, -1, drop = FALSE]
repaired <- vcg_fix_defects(mesh, verbose = TRUE)
attr(repaired, "info")$is_closed_manifold
# repaired mesh can now be inflated
inflated <- mris_inflate(repaired, scale_brain = FALSE)
}
Run the code above in your browser using DataLab