Learn R Programming

geomorph (version 1.1-6)

digit.fixed: Digitize 3D landmarks

Description

An interactive function to digitize three-dimensional (3D) landmarks. Input for the function is either a matrix of vertex coordinates defining a 3D surface object or a mesh3d object as obtained from read.ply.

Usage

digit.fixed(spec, fixed, index = FALSE, ptsize = 1)

Arguments

spec
Name of surface file, as either an object of class shape3d/mesh3d, or matrix of three-dimensional vertex coordinates.
fixed
numeric: The number landmarks (fixed, and curve sliders if desired)
index
logical: Whether selected landmark addresses should be returned
ptsize
numeric: Size to plot the mesh points (vertices), e.g. 0.1 for dense meshes, 3 for sparse meshes

Value

  • Function writes to the working directory an NTS file with the name of the specimen and .nts suffix containing the landmark coordinates. If index=FALSE function returns to the console an n x 3 matrix containing the x,y,z coordinates of the digitized landmarks. If index=TRUE, function returns a list:
  • selecteda matrix containing the x,y,z coordinates of the digitized landmarks
  • fixa matrix of addresses for landmarks that are "fixed" (for internal use)

Details

Function for digitizing "n" three-dimensional landmarks. The landmarks are "fixed" (traditional landmarks). They can be later designated as "curve sliders" (semilandmarks, that will "slide" along curves lacking known landmarks (see Bookstein 1991:376-382, 1997 for algorithm details) if required. A sliding semi-landmark ("sliders") will slide between two designated points, along a line tangent to the specified curvature, and must be defined as "sliders" using function define.sliders.3d or with similar format matrix made outside R. For 3D "surface sliders" (surface semilandmarks that slide over a surface) the function digitsurface should be used instead. NOTE: Function centers the mesh before digitizing (required for further operations). 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):
  1. the RIGHT mouse button (primary) to select points to be digitized (click-drag a box around a vertex to select as landmark),
  2. the LEFT mouse button (secondary) is used to rotate mesh,
  3. the mouse SCROLLER (third/middle) is used to zoom in and out.
NOTE: Digitizing functions on MACINTOSH computers using a standard 3-button mice works as specified. Macs using platform specific single button mice:
  1. press button to rotate 3D mesh,
  2. press button while pressing CONTROL key to select points to be digitized (click-drag a box around a vertex to select as landmark),
  3. press button while pressing OPTION key to to zoom in and out.
Mac mouse settings need adjustment to acquire zooming functions of the "middle/third" mouse button/scroller. Some instructions can be found at http://blog.boastr.net/. In addition, freeware providing "Middle Click" functionality is available at http://magicprefs.com/ for "magicmice" now standard on many Macintosh machines. NOTE: there is no pan (translate) functionality in rgl library for all platforms at this time. }