Get the entropy for an entire image using density binning

img_density_entropy(img, mask = NULL, base = exp(1), ...)

Arguments

img

object of class nifti or character

mask

binary object of class nifti or character

base

Base to take the log for the entropy. Default is e

...

Additional arguments to pass to density.

Examples

#> oro.nifti 0.10.3
#> ------------------------------------------------------------------------------
#> You have loaded oro.nifti after extrantsr (either directly or from another package) - this is likely to cause problems with certain functions on antsImage types, such as origin. #> If you need functions from both extrantsr and oro.nifti, please load oro.nifti first, then extrantsr: #> library(oro.nifti); library(extrantsr)
#> ------------------------------------------------------------------------------
#> #> Attaching package: ‘oro.nifti’
#> The following objects are masked from ‘package:ANTsRCore’: #> #> origin, origin<-
#> The following objects are masked from ‘package:extrantsr’: #> #> origin, origin<-
arr = array(rnorm(100^3), dim = rep(100, 3)) img = oro.nifti::nifti(arr) img_density_entropy(img)
#> [1] 5.321614