applyTransform {Morpho} | R Documentation |
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)
[Package Morpho version 2.12 Index]