im.apply

0th

Percentile

Apply Function Pixelwise to List of Images

Returns a pixel image obtained by applying a function to the values of corresponding pixels in several pixel images.

Keywords
manip, spatial, programming
Usage
im.apply(X, FUN, ...)
Arguments
X

A list of pixel images (objects of class "im").

FUN

A function that can be applied to vectors, or a character string giving the name of such a function.

Additional arguments to FUN.

Details

The argument X should be a list of pixel images (objects of class "im"). If the images do not have identical pixel grids, they will be converted to a common grid using harmonise.im.

At each pixel location, the values of the images in X at that pixel will be extracted as a vector. The function FUN will be applied to this vector. The result (which should be a single value) becomes the pixel value of the resulting image.

Value

A pixel image (object of class "im").

See Also

eval.im for algebraic operations with images.

Aliases
  • im.apply
Examples
# NOT RUN {
  DA <- density(split(amacrine))
  DA
  im.apply(DA, max)
# }
Documentation reproduced from package spatstat, version 1.57-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.