Calculates the SD of an image

Overloaded SD for antsImage objects

sd(x, na.rm = FALSE, ...)

# Default S3 method
sd(x, na.rm = FALSE, ...)

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

Arguments

x

an object for which we want to compute the SD

na.rm

a logical value indicating whether NA should be removed

...

Any additional arguments to be passed to sd

mask

is an object of class antsImage

Examples

img <- antsImageRead(getANTsRData("r16"))
sd(img)
#> [1] 84.81795
sd(img, mask = img > 0)
#> [1] 60.70512