searchlight.searchlight_iterator
searchlight.searchlight_iterator(
mask,
radius,
eager=False,
nonzero=False,
cores=0,
)Create an exhaustive searchlight iterator.
This function generates an exhaustive searchlight iterator that returns ROIVolWindow objects for each searchlight sphere within the provided mask. The iterator visits every non-zero voxel in the mask as a potential center voxel.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| mask | NeuroVol or LogicalNeuroVol | A NeuroVol object representing the brain mask | required |
| radius | float | The radius (in mm) of the spherical searchlight | required |
| eager | bool | Whether to eagerly compute the searchlight ROIs. Default is False, which uses lazy evaluation | False |
| nonzero | bool | Whether to include only coordinates with nonzero values in the supplied mask. Default is False | False |
| cores | int | Number of cores to use for parallel computation. Default is 0, which uses a single core. (Currently not implemented) | 0 |
Returns
| Name | Type | Description |
|---|---|---|
| LazyList or list of ROIVolWindow | A deferred_list object containing ROIVolWindow objects, each representing a searchlight region |