label.border.fast {fsbrain} | R Documentation |
Compute border vertices of a label using Rvcg.
Description
Compute border vertices of a label using Rvcg.
Usage
label.border.fast(surface_mesh, label)
Arguments
surface_mesh |
an fs.surface instance, see |
label |
an fs.label instance (see |
Value
named list with entry 'vertices' containing an integer vector with the indices of the border vertices.
Note
This is faster than using the label.border
function, but it does not fully match its functionality (some parameter are not implemented for this function), and it requires the Rvcg
package, which is an optional dependency.
See Also
label.border
, which is slower but provides more options and does not require Rvcg.
Examples
## Not run:
sjd = fsaverage.path(T);
sj = "fsaverage";
mesh = subject.surface(sjd, sj, hemi="lh");
lab = subject.label(sjd, sj, "cortex", hemi = "lh");
col = rep("white", nrow(mesh$vertices));
bd = fsbrain:::label.border.fast <- function(surface_mesh, label);
col[bd$vertices] = "red";
vis.fs.surface(mesh, col=col);
## End(Not run)
[Package fsbrain version 0.5.5 Index]