Learn R Programming

Morpho (version 2.1)

mirror: mirror landmarks or triangular mesh in place

Description

mirror landmarks or triangular mesh in place

Usage

mirror(x, icpiter = 50, subsample = NULL)

## S3 method for class 'matrix': mirror(x, icpiter = 50, subsample = NULL)

## S3 method for class 'mesh3d': mirror(x, icpiter = 50, subsample = NULL)

Arguments

x
k x 3 matrix or mesh3d
icpiter
integer: number of iterations to match reflected configuration onto original one
subsample
integer: use only a subset for icp matching

Value

  • returns the reflected object

Details

reflect a mesh configuration at the plane spanned by its first 2 principal axis, then try to rigidily register the reflected configuration onto the original one using iterative closest point search to establish correspondences.

Examples

Run this code
data(boneData)
boneMir <- mirror(boneLM[,,1],icpiter=50)
## 2D Example:
require(shapes)
gorfMir <- mirror(gorf.dat[,,1])
plot(gorfMir,asp = 1)
points(gorf.dat[,,1],col=3)
## now mirror a complete mesh
require(rgl)
skullMir <- mirror(skull_0144_ch_fe.mesh,icpiter=10,subsample = 30)
###compare result to original
wire3d(skull_0144_ch_fe.mesh,col=3)
wire3d(skullMir,col=2)

Run the code above in your browser using DataLab