Learn R Programming

oasis (version 3.0.4)

oasis_erode: OASIS Erode Mask

Description

An alternative to using fslerode for mask erosion of a brain mask by a box kernel defined by millimeter

Usage

oasis_erode(mask, mm = c(5, 5, 5))

Arguments

mask

object of class nifti

mm

Number of erosion (in millimeters)

Value

Object of class nifti

Examples

Run this code
# NOT RUN {
library(neurobase)
library(fslr)
library(oasis)
niis = tempfile(fileext = ".nii.gz")
if (require(httr)) {
   url = paste0("https://s3.us-east-2.amazonaws.com/brainder/software/",
   "flair/templates/GG-853-FLAIR-2.0mm.nii.gz")
   req <- httr::GET(url,
   httr::write_disk(path = niis))
   httr::stop_for_status(req)

 flair <- fast_readnii(niis)
 res = oasis_erode(flair > 50, mm = c(2, 2, 2))
}
# }

Run the code above in your browser using DataLab