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

applyTransform

apply affine transformation to data


Description

apply affine transformation to data

Usage

applyTransform(x, trafo, ...)

## S3 method for class 'matrix'
applyTransform(x, trafo, inverse = FALSE, threads = 1,
  ...)

## S3 method for class 'mesh3d'
applyTransform(x, trafo, inverse = FALSE, threads = 1,
  ...)

## Default S3 method:
applyTransform(x, trafo, inverse = FALSE,
  threads = 1, ...)

Arguments

x

matrix or mesh3d

trafo

4x4 transformation matrix or an object of class "tpsCoeff"

...

additional arguments, currently not used.

inverse

logical: if TRUE, the inverse of the transformation is applied (for TPS coefficients have to be recomputed)

threads

threads to be used for parallel execution in tps deformation.

Value

the transformed object

See Also

rotonto, link{rotmesh.onto}, tps3d, computeTransform

Examples

data(boneData)
rot <- rotonto(boneLM[,,1],boneLM[,,2])
trafo <- getTrafo4x4(rot)
boneLM2trafo <- applyTransform(boneLM[,,2],trafo)

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

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