mask <- read_vol(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
# Ellipsoid stretched along z with modest per-iteration jitter
sl_ellip <- resampled_searchlight(mask, radius = 6,
shape_fun = ellipsoid_shape(scales = c(1, 1, 1.4),
jitter = 0.1))
# Simple axis-aligned cube (Chebyshev ball)
sl_cube <- resampled_searchlight(mask, radius = 5, shape_fun = "cube")
# Blobby sphere with 40% dropout on boundary voxels
sl_blob <- resampled_searchlight(mask, radius = 6,
shape_fun = blobby_shape(drop = 0.4, edge_fraction = 0.6))
Run the code above in your browser using DataLab