Overloaded math for antsImage objects

# S4 method for class 'antsImage'
Math(x)

# S4 method for class 'antsImage'
abs(x)

# S4 method for class 'antsImage'
sign(x)

# S4 method for class 'antsImage'
sqrt(x)

# S4 method for class 'antsImage'
ceiling(x)

# S4 method for class 'antsImage'
round(x)

# S4 method for class 'antsImage'
floor(x)

# S4 method for class 'antsImage'
trunc(x)

# S4 method for class 'antsImage'
log(x, base = exp(1))

# S4 method for class 'antsImage'
log10(x)

# S4 method for class 'antsImage'
log2(x)

# S4 method for class 'antsImage'
acos(x)

# S4 method for class 'antsImage'
asin(x)

# S4 method for class 'antsImage'
atan(x)

# S4 method for class 'antsImage'
acosh(x)

# S4 method for class 'antsImage'
asinh(x)

# S4 method for class 'antsImage'
atanh(x)

# S4 method for class 'antsImage'
cos(x)

# S4 method for class 'antsImage'
sin(x)

# S4 method for class 'antsImage'
tan(x)

# S4 method for class 'antsImage'
cosh(x)

# S4 method for class 'antsImage'
sinh(x)

# S4 method for class 'antsImage'
tanh(x)

# S4 method for class 'antsImage'
cospi(x)

# S4 method for class 'antsImage'
sinpi(x)

# S4 method for class 'antsImage'
tanpi(x)

# S4 method for class 'antsImage'
exp(x)

# S4 method for class 'antsImage'
gamma(x)

# S4 method for class 'antsImage'
lgamma(x)

# S4 method for class 'antsImage'
!x

Arguments

x

is an object of class antsImage.

base

a positive or complex number: the base with respect to which logarithms are computed. Defaults to e=exp(1).

Examples

img01 <- as.antsImage(array(1:64, c(4, 4, 4, 1)))
testthat::expect_true(is.antsImage(abs(img01)))
testthat::expect_true(is.antsImage(sign(img01)))
testthat::expect_true(is.antsImage(sqrt(img01)))
testthat::expect_true(is.antsImage(ceiling(img01)))
testthat::expect_true(is.antsImage(floor(img01)))
testthat::expect_true(is.antsImage(trunc(img01)))
img01 <- as.antsImage(array(1:64, c(4, 4, 4, 1)))
testthat::expect_true(is.antsImage(log(img01)))
testthat::expect_true(is.antsImage(exp(img01)))

testthat::expect_true(is.antsImage(log(img01, base = exp(1))))
testthat::expect_true(is.antsImage(log(img01, base = 2)))
testthat::expect_true(is.antsImage(log(img01, base = 10)))
testthat::expect_true(is.antsImage(log10(img01)))
testthat::expect_true(is.antsImage(log2(img01)))

testthat::expect_true(is.antsImage(gamma(img01)))
testthat::expect_true(is.antsImage(lgamma(img01)))

testthat::expect_true(is.antsImage(cos(img01)))
testthat::expect_true(is.antsImage(cospi(img01)))
testthat::expect_true(is.antsImage(acos(img01)))
testthat::expect_true(is.antsImage(acosh(img01)))

testthat::expect_true(is.antsImage(sin(img01)))
testthat::expect_true(is.antsImage(sinpi(img01)))
testthat::expect_true(is.antsImage(asin(img01)))
testthat::expect_true(is.antsImage(asinh(img01)))

testthat::expect_true(is.antsImage(tan(img01)))
testthat::expect_true(is.antsImage(tanpi(img01)))
testthat::expect_true(is.antsImage(atan(img01)))
testthat::expect_true(is.antsImage(atanh(img01)))