Computes sample quantiles for an image, with the option of a mask.

# S3 method for nifti
quantile(x, ..., mask)

# S3 method for anlz
quantile(x, ..., mask)

Arguments

x

Object of class nifti

...

Arguments passed to quantile

mask

object to subset the image. If missing, then all values of the image are used

Value

Output of quantile

Examples

img = nifti(array(rnorm(10^3), dim = rep(10, 3)))
mask = img > 0
quantile(img, mask = mask)
#>          0%         25%         50%         75%        100% 
#> 0.006429538 0.304863159 0.656974861 1.215722182 2.873133341