getSides | R Documentation |
try to identify bilateral landmarks and sort them by side
getSides(x, tol = 3, pcAlign = TRUE, icpiter = 100, ...)
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 |
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.
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 |
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.