RandomSurfaceSearchlight: Create a Random Searchlight iterator for surface mesh

View source: R/Searchlight.R

RandomSurfaceSearchlightR Documentation

Create a Random Searchlight iterator for surface mesh

Description

Creates an iterator that randomly samples searchlight regions on a surface mesh using geodesic distance to define regions.

Usage

RandomSurfaceSearchlight(
  surfgeom,
  radius = 8,
  nodeset = NULL,
  as_deflist = FALSE
)

Arguments

surfgeom

A SurfaceGeometry object representing the surface mesh.

radius

Numeric, radius of the searchlight as a geodesic distance in mm.

Must be a positive numeric scalar.

nodeset

Integer vector, optional subset of surface node indices to use. If supplied, must contain more than one index.

Must be a positive, length-one value.

Details

On each call to nextElem, a set of surface nodes is returned. These nodes index into the vertices of the igraph instance.

Value

An iterator object of class "RandomSurfaceSearchlight".

Examples


file <- system.file("extdata", "std.8_lh.smoothwm.asc", package = "neurosurf")
geom <- read_surf(file)
searchlight <- RandomSurfaceSearchlight(geom, 12)
nodes <- searchlight$nextElem()
length(nodes) > 1



bbuchsbaum/neurosurf documentation built on June 10, 2025, 8:22 p.m.