Learn R Programming

Morpho (version 2.12)

getSides: try to identify bilateral landmarks and sort them by side

Description

try to identify bilateral landmarks and sort them by side

Usage

getSides(x, tol = 3, pcAlign = TRUE, icpiter = 100, ...)

Value

returns a list containing

side1

integer vector containing indices of landmarks on one side

side2

integer vector containing indices of landmarks on the other side

unilat

integer vector containing indices unilateral landmarks

Arguments

x

matrix containing landmarks (see details)

tol

maximal distance allowed between original and mirrored set.

pcAlign

logical: if TRUE orginal and mirrored landmarks will be initally aligned by their PC-axes

icpiter

integer: number of iterations in ICP alignment.

...

more arguments passed to mirror.

Details

This function mirrors the landmark set and aligns it to the original. Then it tries to find pairs. If you have a sample, run a Procrustes registration first (without scaling to unit centroid size, or you later have to adapt tol - see examples) and then use the mean as it is usually more symmetrical.

Examples

Run this code
data(boneData)
proc <- procSym(boneLM,CSinit=FALSE)
mysides <- getSides(proc$mshape)
if (interactive()){
#visualize bilateral landmarks
deformGrid3d(boneLM[mysides$side1,,1],boneLM[mysides$side2,,1])
## visualize unilateral landmarks
rgl::spheres3d(boneLM[mysides$unilat,,1],radius=0.5)
}

Run the code above in your browser using DataLab