# Load a sample brain mask
brain_mask <- read_vol(system.file("extdata", "global_mask_v4.nii", package = "neuroim2"))
# Apply Gaussian blurring to the brain volume
blurred_vol <- gaussian_blur(brain_mask, brain_mask, sigma = 2, window = 1)
# View a slice of the original and blurred volumes
image(brain_mask[,,12])
image(blurred_vol[,,12])
Run the code above in your browser using DataLab