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

scalardilate

Apply Scalar Dilation


Description

Applies scalar dilation to a plane geometrical object, such as a point pattern or a window, relative to a specified origin.

Usage

scalardilate(X, f, ...)

  ## S3 method for class 'im'
scalardilate(X, f, ..., origin=NULL)

  ## S3 method for class 'owin'
scalardilate(X, f, ..., origin=NULL)

  ## S3 method for class 'ppp'
scalardilate(X, f, ..., origin=NULL)

  ## S3 method for class 'psp'
scalardilate(X, f, ..., origin=NULL)

  ## Default S3 method:
scalardilate(X, f, ...)

Arguments

X

Any suitable dataset representing a two-dimensional object, such as a point pattern (object of class "ppp"), a window (object of class "owin"), a pixel image (class "im") and so on.

f

Scalar dilation factor. A finite number greater than zero.

...

Ignored by the methods.

origin

Origin for the scalar dilation. Either a vector of 2 numbers, or one of the character strings "centroid", "midpoint", "left", "right", "top", "bottom", "topleft", "bottomleft", "topright" or "bottomright" (partially matched).

Details

This command performs scalar dilation of the object X by the factor f relative to the origin specified by origin.

The function scalardilate is generic, with methods for windows (class "owin"), point patterns (class "ppp"), pixel images (class "im"), line segment patterns (class "psp") and a default method.

If the argument origin is not given, then every spatial coordinate is multiplied by the factor f.

If origin is given, then scalar dilation is performed relative to the specified origin. Effectively, X is shifted so that origin is moved to c(0,0), then scalar dilation is performed, then the result is shifted so that c(0,0) is moved to origin.

This command is a special case of an affine transformation: see affine.

Value

Another object of the same type, representing the result of applying the scalar dilation.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

plot(letterR)
plot(scalardilate(letterR, 0.7, origin="left"), col="red", add=TRUE)

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.