Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Math.imlist

S3 Group Generic methods for List of Images


Description

These are group generic methods for the class "imlist" of lists of images. These methods allows the usual mathematical functions and operators to be applied directly to lists of images. See Details for a list of implemented functions.

Usage

## S3 methods for group generics have prototypes:
Math(x, ...)
Ops(e1, e2)
Complex(z)
Summary(..., na.rm = TRUE)

Arguments

x,z,e1,e2

Lists of pixel images (objects of class "imlist").

...

further arguments passed to methods.

na.rm

logical: should missing values be removed?

Details

An object of class "imlist" represents a list of pixel images. It is a list, whose entries are pixel images (objects of class "im").

The following mathematical functions and operators are defined for lists of images.

Not all functions will make sense for all types of images. For example, none of the functions in the "Math" group make sense for character-valued images. Note that the "Ops" group methods are implemented using eval.im, which tries to harmonise images via harmonise.im if they aren't compatible to begin with.

  1. Group "Math":

    • abs, sign, sqrt,
      floor, ceiling, trunc,
      round, signif

    • exp, log, expm1, log1p,
      cos, sin, tan,
      cospi, sinpi, tanpi,
      acos, asin, atan

      cosh, sinh, tanh,
      acosh, asinh, atanh

    • lgamma, gamma, digamma, trigamma

    • cumsum, cumprod, cummax, cummin

  2. Group "Ops":

    • "+", "-", "*", "/", "^", "%%", "%/%"

    • "&", "|", "!"

    • "==", "!=", "<", "<=", ">=", ">"

  3. Group "Summary":

    • all, any

    • sum, prod

    • min, max

    • range

  4. Group "Complex":

    • Arg, Conj, Im, Mod, Re

For the binary operations in "Ops", either

  • e1 and e2 are lists of pixel images, and contain the same number of images.

  • one of e1,e2 is a list of pixel images, and the other is a single atomic value.

Value

The result of "Math", "Ops" and "Complex" group operations is another list of images. The result of "Summary" group operations is a numeric vector of length 1 or 2.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Math.im or eval.im for evaluating expressions involving images. solapply for a wrapper for lapply.

Examples

a <- solist(A=setcov(square(1)), B=setcov(square(2)))
  log(a)/2 - sqrt(a)
  range(a)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.