align2procSym: align new data to an existing Procrustes registration

View source: R/procSym.r

align2procSymR Documentation

align new data to an existing Procrustes registration

Description

align new data to an existing Procrustes registration

Usage

align2procSym(x, newdata, orp = TRUE)

Arguments

x

result of a procSym call

newdata

matrix or array of with landmarks corresponding to the data aligned in x

orp

logical: allows to skip orthogonal projection, even if it was used in the procSym call.

Value

an array with data aligned to the mean shape in x (and projected into tangent space)

Note

this will never yield the same result as a pooled Procrustes analysis because the sample mean is iteratively updated and new data would change the mean.

Examples

require(Morpho)
data(boneData)
# run procSym on entire data set
proc <- procSym(boneLM)
# this is the training data
array1 <- boneLM[,,1:60]
newdata <- boneLM[,,61:80]
proc1 <- procSym(array1)
newalign <- align2procSym(proc1,newdata)
## compare alignment for one specimen to Proc. registration using all data
## Not run: 
deformGrid3d(newalign[,,1],proc$orpdata[,,61])

## End(Not run)

Morpho documentation built on June 22, 2024, 7:19 p.m.