Scyland3D: Processing 3D landmarks

Scyland3D is a Python tool for converting 3D raw landmark and semilandmark coordinates exported from landmark acquisition software to a CSV best suited for geometric morphometric analyses. Processing schemes to mirror and reorder these points are provided to address further symmetry issues. This is useful when working on left-right differences in a given species. This tool is designed to pre-process the raw extracted landmarks and to generate a database-like CSV for statistical analyses. The main targeted audience are biologists looking for an easy and quick parser for raw landmarks.

Traditional 2D morphometrics, i.e. in situ or picture measurements of structural element dimensions, have long been favoured to quantitatively compare extant and extinct shapes of organisms (Adams, Rohlf, & Slice, 2013). However, part of these measurements did not reflect the geometry of the structures and depended for example on their relative size. Landmarkbased geometric morphometrics in 2D allows separating a form into size and shape within a set of measures. In this method, landmarks define comparable points within a set of objects and capture their geometry. A Procrustes superimposition then rescales, rotates and translates these landmarks to virtually superimpose all object geometries (Adams et al., 2013;Zelditch, Swiderski, Sheets, & Fink, 2004). Each measured variable, however, is partly independent of other ones on the same structure as all may have been quantified in different 2D views of the same object. Then, merging morphometric datasets for global analyses may bring noise in the results.
Landmark-based geometric morphometrics in 3D emerged with recent imaging techniques among other X-ray microtomography (Adams et al., 2013). 3D surfaces are created based on scanned organisms and landmarks can be set on all views of interest of a given specimen and belong to the same dataset, with the same reference space. Among software allowing digitizing (data acquisition of) 3D landmarks and semilandmarks, there are few free software and they do not offer complete tools for subsequent shape and size analyses. A landmark is a point set up by hand as opposed to a semilandmark that is interpolated by the computer between two landmarks by following the curvature of the studied form. Most morphometricians use R packages to perform size and shape analyses but input data must already be in package-specific formats that often highly differ from the output formats generated by landmark acquisition software products. Moreover, the rise of intra-and interspecific asymmetry questions involves post-processing steps of morphometric datasets that are not managed by current R packages.
We introduce Scyland3D to convert .pts files (format defined on page 37 in https://web.cs. ucdavis.edu/~amenta/LandmarkDoc_v3_b6.pdf), exported by the Landmark software (v3.6 cf https://web.cs.ucdavis.edu/~amenta/LandmarkDoc_v3_b6.pdf) or any landmark processing software, into CSV. Scyland3D first removes duplicated coordinates because landmarks and semilandmarks may coincide in the Landmark software. We then allow to mirror the landmark and semilandmark coordinates for a subset of 3D objects and to reorder these points. This allows performing 3D geometric morphometric analyses between previously asymmetrical objects ( Figure 1). Manual landmarking might generate coordinate duplicates or missing landmarks and semilandmarks. Before processing the data, Scyland3D checks their integrity because setting landmarks in 3D is an error-prone manual operation. Scyland3D thus checks and reports the: • Consistency of folder and file names (one folder per specimen with an underscore between features in the folder and file's name), • Number of landmarks and semilandmarks across all structures, • Presence of duplicate landmarks and semilandmark coordinates exported by the Landmark software.
Processing options can be specified in order to modify the dataset asymmetry. In this case, landmark and semilandmark coordinates of elements characterised by a given feature can be sequentially mirrored and reordered. Mirror processing involves the use of the Least Squares method and generates a regression plane through all the landmark and semilandmark coordinates of an object. This plane is subsequently used as a symmetry plane and a projection of landmark and semilandmark coordinates is generated for each 3D object. For the mirrored objects, a reorder of landmarks and semilandmarks can be done and the software needs a vector containing their new relative positions specified. Indeed, geometric morphometrics aim at comparing shape objects after a standardization process (Procrustes superimposition). During the latter step, the space distance is minimized between equivalent landmarks. This equivalence is given by their relative order of placement, e.g. a minimized distance is calculated between the first landmark placed in object 1 and the first landmark placed in object 2. Such a process implies that landmarks must be placed in the exact same order in all comparable objects of the dataset. Thus, mirrored objects have reverted bending compared to others and this must be compensated by reordering the mirrored landmarks.
Scyland3D is currently used on larger datasets with different specimens to compare upper and lower tooth shapes at intraspecific scale and deciphering symmetry patterns. We aim at characterising tooth shape transformations across growth stages and emerging sexual dimorphism in S. canicula and unravel ontogenetic and evolutionary processes. We provide an example use-case with a subset of our dataset in our Github repository to help newcomers handle Scyland3D.