oasis_erode: OASIS Erode Mask

Description Usage Arguments Value Examples

View source: R/oasis_erode.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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))
}

oasis documentation built on Feb. 22, 2018, 1:02 a.m.

Related to oasis_erode in oasis...