How do I align 3D landmark data to a Procrustes fit in R?

68 Views Asked by At

I'm using the r package called Morpho to create predicted soft tissue nose shapes for populations using the underlying hard tissue (bone). https://cran.r-project.org/web/packages/Morpho/Morpho.pdf

Using guidelines provided by the PhD of author of Morpho (https://freidok.uni-freiburg.de/data/918%20-%20page%20140)

I have an array of 3D landmark data defined as 931 x 3 x 4. For each of the four individuals (3rd dim) the first 617 rows contain soft tissue landmarks, and the following 314 rows contain hard tissue landmarks

combinedarray <- array(c(Comp1matrix,Comp2matrix,Comp3matrix,Comp4matrix), dim=c(931,3,4))

I've done a Procrustes fit for hard tissue configurations:

hardproc <- procSym(combinedarray[618:931,,])

Now I need to register the complete landmark configurations (soft and hard tissue) of all specimens within the hard-tissue shape space - how do I do this?

I've tried:

rot <- rotonto(hardproc$orpdata[,,1],Comp1matrix[618:931,])

and:

newalign <- align2procSym(hardproc,Comp1matrix[618:931,])

but they only give me 314 rows of data, but I think I need a matrix of dimensions of the total landmarks (931).

How do I align each individual/specimen to the hard-tissue consensus?

1

There are 1 best solutions below

0
On

I think I found the answer through trial and error

I think it could possibly be the functions computeTransform and applyTransform. I used a random hard tissue sample as the fixed landmarks and then I applied the Compute and Apply transform to each of the combined (hard and soft) samples

trafo<-computeTransform(combinedarray[,,2],combinedarray[618-931,,4])

transLM<-applyTransform(combinedarray[,,4],trafo)

Fingers crossed it's correct!