powered by
This function calls mri_mask to mask an image
mri_mask
mri_mask(file, mask, outfile = NULL, retimg = TRUE, opts = "", ...)
Character or nifti depending on retimg
retimg
(character) input filename
(character) mask filename
(character) output filename
(logical) return image of class nifti
(character) additional options to mri_mask
additional arguments passed to fs_cmd.
fs_cmd
if (have_fs() && requireNamespace("oro.nifti", quietly = TRUE)) { img = oro.nifti::nifti(array(rnorm(5*5*5), dim = c(5,5,5))) mask = img > 1 res = mri_mask(img, mask) }
Run the code above in your browser using DataLab