Calculates the variance of an image

var(x, ...)

# Default S3 method
var(x, ...)

# S3 method for class 'antsImage'
var(x, ..., na.rm = FALSE, mask = NULL)

Arguments

x

an object for which we want to compute the variance

...

Any additional arguments to be passed to var

na.rm

a logical value indicating whether NA should be removed

mask

is an object of class antsImage

Examples

img <- antsImageRead(getANTsRData("r16"))
var(img)
#> [1] 7194.085