Function: randomSearchlight()
ts
function randomSearchlight(
mask,
radius,
options?): ROIVolWindow[];Defined in: src/searchlight/searchlight.ts:269
Create a spherical random searchlight iterator.
This function generates a spherical random searchlight iterator for analyzing local neighborhoods of voxels within a given radius in a brain mask. The algorithm randomly selects centers and removes all voxels within the searchlight from future consideration.
Centers are drawn from a seedable generator: pass options.seed (or options.rng) for a reproducible set of searchlights. Without either, each call draws a fresh seed, so successive calls give different searchlights.
Parameters
mask
A NeuroVol object representing the brain mask
radius
number
The radius of the searchlight sphere (in mm)
options?
Randomness control: seed or rng
Returns
Array of ROIVolWindow objects