Overloaded Summary for antsImage objects

# S4 method for antsImage
Summary(x, ..., na.rm = FALSE)

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

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

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

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

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

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

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

Arguments

x

is an object of class antsImage.

...

further arguments passed to summary methods

na.rm

logical: should missing values be removed?

Examples

vec = 1:64 img01 <- as.antsImage(array(vec, c(4,4,4,1))) testthat::expect_equal(max(img01), max(vec)) max(img01)
#> [1] 64
testthat::expect_equal(min(img01), min(vec)) min(img01)
#> [1] 1
testthat::expect_equal(sum(img01), sum(vec)) range(img01)
#> [1] 1 64
testthat::expect_equal(range(img01), range(vec)) prod(img01/25)
#> [1] 0.4317738
testthat::expect_equal(prod(img01/25), prod(vec/25), tolerance = 1e-5)