These functions allow simple transformations to be applied quickly, or in a
chosen order. They represent simplified interfaces to the
buildAffine
and applyTransform
functions, and
are compatible with the chaining operator from the popular magrittr
package (although performing one single transformation may be preferable).
translate(source, translation, ...)
rescale(source, scales, anchor = c("none", "origin", "centre", "center"), ...)
skew(source, skews, anchor = c("none", "origin", "centre", "center"), ...)
rotate(source, angles, anchor = c("none", "origin", "centre", "center"), ...)
source | A 2D or 3D image, in the sense of |
---|---|
translation | Translations along each axis, in |
... | Additional arguments to |
scales | Scale factors along each axis. |
anchor | The fixed point for the transformation. Setting this parameter
to a value other than |
skews | Skews in the XY, XZ and YZ planes. |
angles | Roll, pitch and yaw rotation angles, in radians. If
|
The transformed image.
Jon Clayden <code@clayden.org>