Learn R Programming

Morpho (version 2.1)

fixLMmirror: estimate missing landmarks from their bilateral counterparts

Description

estimate missing landmarks from their bilateral counterparts

Usage

fixLMmirror(x, pairedLM)

## S3 method for class 'array': fixLMmirror(x, pairedLM)

## S3 method for class 'matrix': fixLMmirror(x, pairedLM)

Arguments

x
a matrix or an array containing landmarks (3D or 2D)
pairedLM
a k x 2 matrix containing the indices (rownumbers) of the paired LM. E.g. the left column contains the lefthand landmarks, while the right side contains the corresponding right hand landmarks.

Value

  • a matrix or array with fixed missing bilateral landmarks.

Details

the configurations are mirrored and the relabled version is matched onto the original using a thin-plate spline deformation. The missing landmark is now estimated using its bilateral counterpart.

Examples

Run this code
data(boneData)
left <- c(4,6,8)
## determine corresponding Landmarks on the right side:
# important: keep same order
right <- c(3,5,7)
pairedLM <- cbind(left, right)
exampmat <- boneLM[,,1]
exampmat[4,] <- NA #set 4th landmark to be NA
fixed <- fixLMmirror(exampmat, pairedLM=pairedLM)
deformGrid3d(fixed, boneLM[,,1],ngrid=0)
## result is a bit off due to actual asymmetry

Run the code above in your browser using DataLab