clustered_searchlight | R Documentation |
This function generates a searchlight iterator that iterates over successive spatial clusters in an image volume. It allows for the exploration of spatially clustered regions within the provided mask by using either a pre-defined clustered volume or performing k-means clustering to generate the clusters.
clustered_searchlight(mask, cvol = NULL, csize = NULL)
mask |
A |
cvol |
An optional |
csize |
An optional integer specifying the number of clusters to be
generated using k-means clustering (ignored if |
A deferred_list
object containing ROIVol
objects, each
representing a clustered region within the image volume.
# Load an example brain mask
mask <- read_vol(system.file("extdata", "global_mask.nii", package="neuroim2"))
# Generate a clustered searchlight iterator with 5 clusters
## Not run:
clust_searchlight <- clustered_searchlight(mask, csize = 5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.