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

Description Usage Arguments Details Value Examples

View source: R/getSides.r

Description

try to identify bilateral landmarks and sort them by side

Usage

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

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.

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

Examples

1
2
3
4
5
6
7
8
9
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)
}

Morpho documentation built on Sept. 9, 2021, 9:07 a.m.