View source: R/utils_outer_smooth.R
generate_smooth_envelope | R Documentation |
Alternative to 'Matlab' version of 'pial-outer-smoothed'
,
use this function along with fill_surface
.
generate_smooth_envelope(
surface_path,
save_as = NULL,
inflate = 3,
verbose = TRUE,
save_format = c("auto", "bin", "asc", "vtk", "ply", "off", "obj", "gii", "mz3", "byu")
)
surface_path |
path to |
save_as |
save final envelope to path, or |
inflate |
number of |
verbose |
whether to verbose the progress; default is true |
save_format |
format of saved file when |
A 3-dimensional mesh that contains vertices and face indices,
the result is also saved to save_as
is specified.
if(interactive() &&
file.exists(file.path(default_template_directory(), "N27"))) {
library(threeBrain)
fs_path <- file.path(default_template_directory(), "N27")
# lh.pial-outer-smoothed
lh_pial <- file.path(fs_path, "surf", "lh.pial")
save_as <- file.path(fs_path, "surf", "lh.pial-outer-smoothed")
generate_smooth_envelope(lh_pial, save_as)
# rh.pial-outer-smoothed
rh_pial <- file.path(fs_path, "surf", "rh.pial")
save_as <- file.path(fs_path, "surf", "rh.pial-outer-smoothed")
generate_smooth_envelope(rh_pial, save_as)
brain <- threeBrain(
path = fs_path, subject_code = "N27",
surface_types = 'pial-outer-smoothed'
)
brain$plot(controllers = list(
"Surface Type" = 'pial-outer-smoothed'
))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.