powered by
Determine if only values in a mask are 0/1
check_mask(mask, allow.NA = FALSE, allow.array = TRUE)
Logical indicating if object is binary mask with only 0, 1, and NA
NA
if applicable
Object of class nifti
nifti
allow NAs in the mask
if class(mask) is "array", is this OK?
class(mask)
"array"
arr = array(rbinom(1000, size = 1, prob = 0.2), dim = c(10,10,10)) nim = oro.nifti::nifti(arr) check_mask(nim)
Run the code above in your browser using DataLab