read.ply
.
digitsurface(spec, fixed, ptsize = 1, center = TRUE)
digit.fixed
, OR a p-x-k matrix of 3D coordinates collected previouslybuildtemplate
) by downsampling scanned mesh, registering template with
current specimen via GPA. A nearest neighbor algorithm is used to match template surface landmarks to current specimen's.
To use function digitsurface, the template must be constructed first, and 'template.txt' be in the working directory. Because template
matching is based on the correspondence of fixed landmark points in the template and the specimen, a minimum of four fixed landmarks must be used.Some of the "fixed" landmarks digitized with digitsurface can be later designated as "curve sliders" using function
define.sliders
if required (see details in digit.fixed
).
NOTE: Function centers the mesh before digitizing by default (center=TRUE). If one chooses not to center,
specimen may be difficult to manipulate in rgl window.
Digitizing Digitizing is interactive between landmark selection using a mouse (see below for instructions), and the R console. Once a point is selected, the user is asked if the system should keep or discard the selection (y/n). If "y", the user is asked to continue to select the next landmark. If "n" the removes the last chosen landmark, and the user is asked to select it again. This can be repeated until the user is comfortable with the landmark chosen.
To digitize with a standard 3-button (PC):
NOTE: Digitizing functions on MACINTOSH computers using a standard 3-button mice works as specified. Macs using platform specific single button mice, XQuartz must be configured: go to Preferences > Input > tick "Emulate three button mouse":
NOTE: there is no pan (translate) functionality in rgl library for all platforms at this time.
AUTO mode
The function as described above (for interactive mode) calls digit.fixed
, prompting the user to select fixed landmarks
in the rgl window. However if the user has digitized these fixed landmark elsewhere (e.g., in other software), then the input for
parameter 'fixed' can be a p-x-k matrix of 3D coordinates. In this case, the function the function will automatically use these
landmarks and fit the template of sliding semilandmarks.
Mitteroecker P & Gunz P (2009) Advances in Geometric Morphometrics. Evolutionary Biology 36(2):235-247.
buildtemplate