Overloaded uniqueness operation for antsImage objects

# S3 method for class 'antsImage'
unique(x, incomparables = FALSE, mask = NULL, ...)

Arguments

x

is an object of class antsImage.

incomparables

a vector of values that cannot be compared.

mask

binary mask of values to subset

...

additional arguments passed to unique

Examples

img <- antsImageRead(getANTsRData("r16"))
img[img > 5] <- 0
sort(unique(img))
#> [1] 0 1 2 3 4 5