R/fast_dice.R
fast_dice_tab.Rd
Fast Dice Tabulation
fast_dice_tab(x, y) fast_dice(x, y, verbose = FALSE)
A nifti image, filename, or niftiImage
nifti
niftiImage
A logical indicating output
A table object
library(oro.nifti) set.seed(20161007) dims = rep(10, 3) arr = array(rnorm(10*10*10), dim = dims) nim = oro.nifti::nifti(arr) > -1 fast_dice_tab(nim, nim) #> y #> x FALSE TRUE #> FALSE 161 0 #> TRUE 0 839 fast_dice(nim, nim) == 1 #> [1] TRUE