Learn R Programming

Morpho (version 2.12)

applyTransform: apply affine transformation to data

Description

apply affine transformation to data

Usage

applyTransform(x, trafo, ...)

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

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

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

Value

the transformed object

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.

See Also

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

Examples

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

Run the code above in your browser using DataLab