# Create a simple 3D volume
bspace <- NeuroSpace(c(10,10,10), c(1,1,1))
vol <- NeuroVol(array(rnorm(10*10*10), c(10,10,10)), bspace)
# Create a 3x3x3 mean smoothing kernel
kern <- Kernel(c(3,3,3), vdim=c(3,3,3))
# Apply the kernel to smooth the volume
smoothed_vol <- mapf(vol, kern)
Run the code above in your browser using DataLab