Learn R Programming

geomorph (version 2.0.1)

warpRefMesh: Creates a mesh3d object warped to the mean shape.

Description

A function to take a ply file and use thin-plate spline method to warp the file into the estimated mean shape for a set of aligned specimens.

Usage

warpRefMesh(file, mesh.coord, ref, color = NULL, centered = FALSE)

Arguments

file
An ASCII ply file
mesh.coord
A p x k matrix of 3D coordinates digitized on the ply file.
ref
A p x k matrix of 3D coordinates made by mshape
color
Color to set the ply file $material. If the ply already has color, use NULL. For ply files without color, color=NULL will be plotted as grey.
centered
Logical If the data in mesh.coords were collected from a centered mesh (see details).

Value

  • Function returns a mesh3d object, which is a list of class mesh3d (see rgl for details)

Details

Function takes a ply file and its landmark coordinates uses the thin-plate spline method (Bookstein 1989) to warp the mesh into the shape defined by a second set of landmark coordinates, usually those of the mean shape for a set of aligned specimens. It is highly recommended that the mean shape is used as the reference for warping (see Rohlf 1998). The workflow is as follows:
  1. Calculate the mean shape usingmshape
Choose an actual specimen to use for the warping. The specimen used as the template for this warping is recommended as one most similar in shape to the average of the sample, but can be any reasonable specimen - do this by eye, or use findMeanSpec Warp this specimen into the mean shape using warpRefMesh Use this average mesh where it asks for a mesh= in the analysis functions and visualization functions

References

Bookstein, F. L. 1989 Principal Warps: Thin-Plate Splines and the Decomposition of Deformations. IEEE Transactions on Pattern Analysis and Machine Intelligence 11(6):567-585. Rohlf, F. J. 1998. On Applications of Geometric Morphometrics to Studies of Ontogeny and Phylogeny. Systematic Biology. 47:147-158.

See Also

findMeanSpec