A function to take a 3D mesh and use thin-plate spline method to warp the file into the estimated mean shape for a set of aligned specimens
A mesh3d object (e.g. made by
A p x k matrix of 3D coordinates digitized on the ply file.
A p x k matrix of 3D coordinates made by
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.
Logical If the data in mesh.coords were collected from a centered mesh (see details).
Function takes a 3D mesh (class mesh3d or shape3d, e.g. from
read.ply) and its digitized landmark coordinates
and 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:
Calculate the mean shape using
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
Warp this specimen into the mean shape using
Use this average mesh where it asks for a mesh= in the analysis functions and visualization functions
Users should ensure that their mesh and mesh.coord matrix are in the same scale (a common issue is that the mesh is in micrometers and coordinates are in mm or cm). Use range(mesh$vb[1:3,]) and range(mesh.coord) to check and adjust mesh.coord as necessary.
For landmark coordinates digitized with geomorph digitizing functions, centered = TRUE. This refers to the
specimen being centered prior to landmark acquisition in the RGL window. For landmark data collected outside
of geomorph, centered=FALSE will usually be the case. The returned mesh3d object is for use in geomorph
functions where shape deformations are plotted (
Function returns a mesh3d object, which is a list of class mesh3d (see rgl for details)
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.