antsImage-summary | R Documentation |
Overloaded Summary for antsImage objects
## S4 method for signature 'antsImage'
Summary(x, ..., mask = NULL, na.rm = FALSE)
max(x, ..., na.rm = FALSE)
min(x, ..., na.rm = FALSE)
## S4 method for signature 'antsImage'
min(x, ..., mask = NULL, na.rm = FALSE)
## S4 method for signature 'antsImage'
max(x, ..., mask = NULL, 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)
x |
is an object of class |
... |
further arguments passed to summary methods |
mask |
binary mask of values to subset |
na.rm |
logical: should missing values be removed? |
vec <- 1:64
img01 <- as.antsImage(array(vec, c(4, 4, 4, 1)))
testthat::expect_equal(max(img01), max(vec))
max(img01)
testthat::expect_equal(min(img01), min(vec))
min(img01)
testthat::expect_equal(sum(img01), sum(vec))
range(img01)
testthat::expect_equal(range(img01), range(vec))
prod(img01 / 25)
testthat::expect_equal(prod(img01 / 25), prod(vec / 25), tolerance = 1e-5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.