Quantifying surface topography of biological systems from 3D scans
Funding information
This material is based upon work supported in part by the Engineering Research Center Program of the National Science Foundation under NSF Cooperative Agreement No. EEC-1449501. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author (s) and do not necessarily reflect those of the National Science Foundation. S.B. was supported by an FWO-Flanders Postdoctoral Fellowship (12I8819N).
Handling Editor: Arthur Porto
Abstract
- Understanding the three-dimensional (3D) surface complexity of biological systems can yield fundamental insights into how organisms interact with their environments. The wealth of current imaging technologies permits detailed 3D visualization of biological surfaces on the macro-, micro- and nanoscale. Analysis of the reconstructed 3D images, however, remains a challenging proposition.
- Here, we present QuSTo, a versatile, open-source program developed in Python to quantify surface topography from profiles obtained from 3D scans. The program calculates metrics that quantify surface roughness and the size (i.e. height and length) and shape (i.e. convexity constant (CC), skewness (Sk) and kurtosis (Ku)) of surface structures.
- We demonstrate the applicability of our program by quantifying the surface topography of snake skin based on newly collected data from white light 3D scans of the ventrum and dorsum of 32 species. To illustrate the utility of QuSTo for evolutionary and ecological research, we test whether snake species that occur in different habitats differ in skin surface structure using phylogenetic comparative analyses.
- The QuSTo application is free, open-source, user-friendly and easily adapted for specific analysis requirements (available in GitHub, github.com/GMLatUCDavis/QuSTo) and is compatible with 3D data obtained with different scanning techniques, for example, white light and laser scanning, photogrammetry, gel-based stereo-profilometry. Scientists from various disciplines can use QuSTo to examine the surface properties of an array of animal and plant species for both fundamental and applied biological and bioinspired research.
1 INTRODUCTION
There is notable variation in body shape and form among different living organisms, and morphologists have been instrumental in using a wide variety of visualization techniques to better understand the nature of variation among species (Irschick & Higham, 2016). Reconstructing and analysing the shapes of biological structures across different length scales and surface structures is important for many reasons, including detailed description of morphology for studies of macro-evolution, accurate reference for bioinspired research and for testing basic form-function relationships. As noted by Forbes (2006), biological structures offer a ‘hidden world’ which, once revealed, can shed light on function. In particular, knowledge of the three-dimensional (3D) structural surface details of biological systems is crucial as, amongst other uses, it provides insight into how species interact with their environments. For example, scanning electron microscopy (SEM) studies revealed the intricate surface structure of lotus leaves (Nelumbo), thereby explaining the ‘Lotus-leaf effect’ in which water droplets are repelled off the ultrahydrophobic leaf surface enabling self-cleaning (Neinhuis & Barthlott, 1997). Other examples in which scientists used studies of anatomy and structure to develop understanding of form-function relationships include toepads in geckos (Autumn et al., 2000, 2002) and shark skin (Ankhelyi et al., 2018; Oeffner & Lauder, 2012). Such investigations thus provide a valuable resource for bioinspired studies (Domel et al., 2018; Wen et al., 2014, 2015).
In recent years, advances in imaging techniques have enabled scientists to image and analyse the 3D shape of organic surface structures at varying length scales by means of X-ray computed tomography (X-ray CT), photogrammetry, laser scanning, gel-based stereo-profilometry (GSP) and atomic force microscopy (AFM), to name a few. Although these techniques have proven valuable for the visualization and analysis of complex forms and shapes, there remains a need for more flexible, open-access software solutions that can analyse 3D surface data from a range of scans, and across a range of computing platforms.
Here, we describe a new analysis application—QuSTo (Quantification of Surface Topography)—which addresses the aforementioned needs. The QuSTo code is freely available in GitHub (github.com/GMLatUCDavis/QuSTo) and supplemented with a written tutorial (ReadMe.txt). In this paper, we describe this program, and as a proof of concept, use it to analyse the surface topography of the dorsal and ventral skin of 32 snake species from white light 3D scans. To further illustrate the broad applicability of our method for the fields of evolution and ecology, we also examined how variation in the skin surface topology of snake species varies in relation to their habitat use.
As the skin of snakes is among the most diverse of all terrestrial vertebrates (Bereiter-Hahn, 1986; Schmidt & Gorb, 2012), and snakes exhibit notable variation in habitat use (Hsiang et al., 2015), investigating the possible linkage between the skin surface structure and habitat use of snakes is of general interest to a wide range of biologists and engineers. In addition to understanding the ecomorphological significance of the fine surface structures of snake skin, there is also value in studying the evolution of snake skin to uncover potential bio-inspired engineering applications and technology development. As there is a need for novel materials and structures that can for instance effectively burrow into soil (e.g. Chen2021; Huang et al., 2020; Naclerio et al., 2018; Ortiz et al., 2019) or generate frictional anisotropy (e.g. Martinez et al., 2019; Tramsen et al., 2018), studying how the 3D surface structures of snakes relates to habitat use might provide important insight. Further, as the study of robotics continues to mature, there are potential benefits from integrating bioinspired features into these designs, see for example, snake-inspired robots capable of locomoting on complex and rugged terrain (e.g. Marvi et al., 2014).
2 QUSTO PROGRAM AND WORKING EXAMPLE
QuSTo is an open-source application developed in the programming language Python (version 3.7) to quantify the topography of biological surfaces from any profile taken from 2D or 3D images. Packaged with QuSTo is a supplementary module, called QuSlicer, that allows users to obtain 2D elevation profiles from 3D mesh files (in .obj, .ply or .stl format) which can be used to provide the input data for QuSTo. The QuSTo application has a graphical user interface (GUI) that enables users to quantify the surface roughness, as well as the size (e.g. length and height) and shape (convexity, kurtosis, skewness) of specific surface structures. In this section, we elaborate on the methods and mathematical formulations that the QuSTo code uses to quantify overall surface topography. We do so based on a newly collected dataset of white light 3D scans of the ventral and dorsal skin surface of 32 snake species. To illustrate the use of QuSTo for evolutionary ecological research, we examine evolutionary divergence in skin surface structures among snake species inhabiting different habitats using phylogenetic comparative statistics.
2.1 Snake specimens and data collection
Fifty-five liquid-preserved specimens belonging to 32 different snake species were obtained from the Museum of Vertebrate Zoology (MVZ) at the University of California Berkeley (CA, USA). Species were chosen to represent a reasonable sample of the morphological, ecological and taxonomic diversity of snakes (Table S1). While not comprehensive, this sample includes 27 genera, including from some of the major groups of snakes, such as Acrochordidae, Boidae, Colubridae, Viperidae, Pythonidae, Leptotyphlopidae and Elapidae. After measuring body length (from snout to tip of the tail) with a measuring tape (precision = 0.1 mm) and diameter with callipers (precision = 0.05 mm) at the centre along the snake's length, we scanned sections on the dorsal and ventral skin of each specimen with a structured white light scanner (VR-3100, Keyence). The scanner obtains 3D images of an object by projecting patterns of white light on the scanned surface while a camera and light-sensing system record the distortion of the light pattern on the object (see e.g. Niven et al., 2009; Rocchini et al., 2001). The VR-3000 Series software then reconstructs the 3D geometry of the object being scanned. The scans have an area that is 24 mm in length and 18 mm in width, with a reported height resolution of 0.1 µm. Prior to scanning, the skin surface of each specimen was gently patted dry to remove residual liquid and avoid light reflections that may distort 3D imaging. Four scans were taken on the central one-third section along the snake's length, two scans on the dorsum and two on the ventrum. To remove the overall curvature resulting from the snake's diameter and length, a 3D polynomial function of 5th order or smaller was fitted to the images. Then, the fitted function was subtracted from the original scan, resulting in a computationally flattened image. Afterwards, the 3D images were cropped to an area that captured three to 15 scales along its length. Two elevation profiles were acquired per scan along the longitudinal axis (from head to tail), yielding eight profiles per specimen (four along the dorsal scales and four along the ventral scales). The profiles were obtained using the VR-3000 Series software (Figure 1a,b). As an example, the 3D scans and elevation profiles of four ecologically and morphologically diverse snake species (Acrochordus granulatus, Charina bottae, Hydrophis cyanocinctus and Lampropeltis getula) are shown in Figure 2. The specific locations of the 2D profiles were chosen as those with the least wear determined based on systematic visual inspection of the preserved specimens. Regardless, repeatability tests showed that the profile location has no significant influence on surface topography quantification (see below; Table S2). While the 2D profiles analysed as part of this work were obtained from the Keyence VR-3000 Series software, the supplementary QuSlicer module can be used to generate and flatten profiles for use in QuSTo (as in Figure 6). More information on the QuSlicer can be found in the GitHub site (https://github.com/GMLatUCDavis/QuSTo) and accompanying ReadMe file.
![Details are in the caption following the image Details are in the caption following the image](/cms/asset/1e2514b5-3fc6-4e02-8dd8-883a287d0964/mee313603-fig-0001-m.png)
![Details are in the caption following the image Details are in the caption following the image](/cms/asset/4a5c3d86-8b28-4771-968f-adde93ed8ed5/mee313603-fig-0002-m.png)
2.2 Data format of the input file
The QuSTo code requires input data in the form of two text strings containing the x and z coordinates (parallel and perpendicular to the skin surface respectively) of a surface elevation profile (Figure 1b). These profiles can be obtained using the QuSlicer module or using any software capable of generating elevation profiles from a 3D image. Since the z coordinates need to be rounded to the nearest integer to reliably calculate the surface shape parameters in QuSTo, the calculation accuracy improves as the z coordinate values increase—a process that can be controlled by choosing the adequate input data units. For this particular study, the input files obtained from our white light scans were.csv files containing two data columns, the first column containing the x coordinate data and the second column containing the z coordinate data. The profiles were analysed in units of micrometres, which resulted in z coordinates between 23 and 1,150.
2.3 Surface feature quantification with QuSTo
![urn:x-wiley:2041210X:media:mee313603:mee313603-math-0001 urn:x-wiley:2041210X:media:mee313603:mee313603-math-0001](/cms/asset/de9f4e8c-5f6a-4328-8dd4-51c5f336d1de/mee313603-math-0001.png)
![urn:x-wiley:2041210X:media:mee313603:mee313603-math-0002 urn:x-wiley:2041210X:media:mee313603:mee313603-math-0002](/cms/asset/8e5cffcb-a83e-40d3-a211-f45df4467494/mee313603-math-0002.png)
![Details are in the caption following the image Details are in the caption following the image](/cms/asset/604ad257-c248-4d7e-9626-07fbabce16d9/mee313603-fig-0003-m.png)
![urn:x-wiley:2041210X:media:mee313603:mee313603-math-0003 urn:x-wiley:2041210X:media:mee313603:mee313603-math-0003](/cms/asset/80252bde-db07-4bb8-8c5d-21c5404a2640/mee313603-math-0003.png)
![urn:x-wiley:2041210X:media:mee313603:mee313603-math-0004 urn:x-wiley:2041210X:media:mee313603:mee313603-math-0004](/cms/asset/0aa641be-1f37-4df7-bbbb-07c6ea47b123/mee313603-math-0004.png)
![urn:x-wiley:2041210X:media:mee313603:mee313603-math-0005 urn:x-wiley:2041210X:media:mee313603:mee313603-math-0005](/cms/asset/7e544ba6-6713-44b5-a363-1f4b45421579/mee313603-math-0005.png)
![Details are in the caption following the image Details are in the caption following the image](/cms/asset/96aba64c-c290-4697-bfe3-54a1f111a065/mee313603-fig-0004-m.png)
Calculation of the CC, Sk and Ku parameters is illustrated with three idealized surface structures described by a quadratic function, a normal distribution and a truncated, inverted lognormal distribution (Figure 4a–c). The CC parameter takes a value of −200 for the quadratic function, indicating that its shape is concave down. Both the normal and inverted lognormal distributions have a positive CC value. However, the CC for the normal distribution has a greater magnitude (237.8) than the lognormal distribution (32.6) because it has a stronger concave up shape. Histograms of the statistical distributions are shown for the three structures, where the quadratic function and normal distribution have a skewness close to zero because they have symmetric shapes. The inverted lognormal distribution has a Sk of −0.45, indicating that it is skewed towards large x coordinate values. Both the quadratic function and the lognormal distribution have a Ku of 2.1 while the normal distribution has a value of 2.8. The greater Ku for the normal distribution indicates that it is more ‘heavy-tailed’ than the quadratic function and lognormal distribution. The Ku value for the normal distribution is slightly lower than the theoretical value of 3.0; this difference is due to the rounding of the z coordinate values to integers.
For each snake specimen, we obtained up to 32 measurements of H, L, CC, Sk and Ku (16 dorsal; 16 ventral) and eight Ra measurements (four dorsal; four ventral) using QuSTo. We used these data to perform a statistical analysis on the correlation between skin surface topography and habitat use of snakes. Repeatability of the imaging protocol was statistically significant and relatively high (estimated by the intra-class coefficient; Wolak et al., 2012; Table S2).
2.4 An evolutionary ecological working example
To illustrate the use of our method in an evolutionary ecological framework, we tested the hypothesis that snake species inhabiting similar environments have evolved similar skin surface structures. We used a phylogenetic approach to explore patterns of interspecific variation in skin surface topography by means of the H, L, L/H (scale ratio), CC, Sk, Ku and Ra parameters. To do so, we pruned the time-calibrated phylogenetic tree constructed by Zheng and Wiens (2016) to include only the 32 species under investigation. All analyses were performed in R (R Core Team, 2013).
Based on species average trait values, we used phylogenetic generalized least square (PGLS) analyses to first examine the relationship between body length and the different skin morphology parameters considered in this study (caper package; Orme et al., 2013). We controlled the structure of the phylogenetic signal by optimizing the branch length transformations using maximum-likelihood for lambda (λ = ML) and with kappa and delta set to 1 (κ = 1, δ = 1). Next, we used PGLS analyses to examine the link between species’ environment and their skin surface topography parameters. Based on information from the literature (Table S1), each species was assigned to one of four habitat use classes: arboreal, aquatic, terrestrial and (semi-)fossorial. Obviously, snakes are known to be somewhat plastic in their habitat use, and some variability within each habitat classification is expected. However, the practice of using basic habitat categorizations from the literature is well-accepted (e.g. Hsiang et al., 2015; Kulyomina et al., 2019), and these habitat categorizations can be considered to be estimates of primary habitat use. We accounted for the effect of body length (as a covariate) in these analyses in cases where body length was significantly related to the skin surface variable of interest. All tests were performed for the dorsal and ventral skin surface separately. Aside from the adjusted R-squared (R2), we report the t- and p-values of the coefficient estimate, and the F-values for models with multilevel factors. As highlighted by others (e.g. Baker, 2016; Nuzzo, 2014), the interpretation of p-values in statistical analyses should be viewed with caution, as there has been an overemphasis of the importance of p-values being <0.05 before a trend can be considered worthy of discussion. Following recommendations set forth in Dushoff et al. (2019), we present all statistical tests and p-values and discuss general trends, but we do not focus unnecessarily on p < 0.05 as our only metric worthy of discussion.
Our phylogenetic comparative analysis showed that overall skin surface topography and the shape of surface structures varies greatly among snake species (Figure 5; Table S1; Figure S1). Variation in individual body length explained a statistically significant portion of the observed interspecific variation in scale length (dorsal: R2 = 0.59, t = 6.67, p < 0.001; ventral: R2 = 0.58, t = 6.680, p < 0.001) and scale height (dorsal: R2 = 0.39, t = 4.53, p < 0.001; ventral: R2 = 0.13, t = 2.35, p = 0.026), but not in L/H scale ratio (dorsal: t = −1.86, p = 0.074; ventral: t = 0.58, p = 0.569) or in any of the scale shape variables (t ≤ 0.26, p > 0.05; Table S3). While our analysis showed that the roughness of the ventral skin surface of snakes is not body size-dependent (R2 = 0.01, t = 1.19, p = 0.244), it did indicate that surface roughness on the dorsum significantly increases with snake size (R2 = 0.20, t = 2.95, p = 0.006; Table S3).
![Details are in the caption following the image Details are in the caption following the image](/cms/asset/b5463c14-5600-44f8-bdde-ed066e63cc52/mee313603-fig-0005-m.png)
Our analyses also indicated that relative (to body size) scale height is significantly related to species’ habitat use (dorsal: F3,28 = 4.754, p = 0.005; ventral: F3,28 = 3.726, p = 0.015; Tables S3). Specifically, ventral scales of arboreal species are proportionally higher than fossorial (t = −2.646, p = 0.013) and terrestrial species (t = −2.242, p = 0.033). Moreover, the ventral skin surface of fossorial snakes tend be smoother (i.e. lower Ra) than aquatic (t = −2.032, p = 0.052) and arboreal snakes (t = −2.010, p = 0.054). Interestingly, while we find considerably interspecific variation in the convexity constant, skewness and kurtosis of both the ventral and dorsal scales, phylogenetically informed analyses indicate no statistically significant differences among species using distinct habitats (Tables S3 and S4).
To unravel ecological patterns of skin surface topography and scale shape among snake species, our analyses suggest that habitat use may be an important factor driving diversification in scale height and skin roughness, but less so in scale shape (convexity, skewness and kurtosis). The overall limited support for a strong ecomorphological relationship may not be surprising, as the evolution of skin surface structure in scaled vertebrates is likely influenced by a multitude of environmental and social factors, including climate conditions (e.g. Sherbrooke et al., 2007) predation pressure (e.g. Broeckhoven et al., 2018), and intraspecific competition (e.g. Song et al., 2011).
3 DISCUSSION
The 3D reconstruction of structurally complex biological surfaces is achievable at high-resolution using various digital techniques, yet its quantification often remains challenging due to the lack of free and versatile open-source software. We developed QuSTo in order to fill this gap. A major benefit of this application is its compatibility with other tools and methods. QuSTo can process any string of data (in .csv format) containing the 2D coordinates of a surface elevation profile, allowing researchers to analyse data across length scales generated by a range of different visualization techniques, including X-ray CT scanning, gel-based stereo-profilometry, laser and white light scanning, photogrammetry and even manual surveying. This is important because biological surface structures can vary in size by orders of magnitude, including nanometre-scale bumps and dimples in the cuticle of the arthropod carapace (e.g. Brzozowska et al., 2014), micrometer-scale spikes on the barbules of bird feathers (e.g. McCoy et al., 2018), to macrometer-scale patterns in tree bark (e.g. Yunus et al., 1990). Figure 6 presents an example that highlights the versatility of QuSTo. The image shows the photogrammetry scan of a lizard tail (model 59B) obtained from www.digitallife3d.org, a laser scan of a mammoth molar (media ID: 5695) obtained from MorphoSource (www.morphosource.org), and an X-ray CT scan of a gastropod shell (media ID: 40436) also obtained from MorphoSource. For these examples, QuSlicer was used to generate the 2D profiles and QuSTo was used to obtain the CC, Sk, Ku and Ra parameters shown in each of the figures. Another advantage of QuSTo is its open-access availability and integrated graphical users interface. As such, the software can run on a variety of platforms, with the goal of making QuSTo available for biological research, education, citizen science projects and non-profit sectors. In addition, the source code is publicly available, allowing users and communities to modify and expand the current capabilities.
![Details are in the caption following the image Details are in the caption following the image](/cms/asset/80fd5a1c-13b2-46d9-a56d-c5fdf506b782/mee313603-fig-0006-m.png)
QuSTo is designed to quantify the surface topography of biological systems so that researchers might gain a better understanding of their diversity and evolution. Biological surfaces are the interface between an organism and its environment, and as such, they play an important role in a variety of ecologically relevant functions such as protection against extreme hydric and thermic conditions, thermoregulation, colouration, body cleaning and locomotion (Gorb, 2009). Structural adaptations of the skin surface, for instance, enable drag reduction in sharks (Lauder et al., 2016), superblack coloration in birds of paradise (McCoy et al., 2018), self-cleaning in geckos (Hansen & Autumn, 2005), and determine the coefficient of friction between biological surfaces and substrates (e.g. snakes: Hazel et al., 1999; grasses: Kulić et al., 2009; insects: Labonte & Federle, 2015). Surface roughness, and surface feature height and length can impact the coefficient of friction between surfaces and granular substrates (e.g. Martinez & Frost, 2017; Uesugi & Kishida, 1986) and influence locomotor efficiency in some animals. In burrowing sand lances (Ammodytes), for instance, the fish are believed to select specific environments with a narrow range of particle sizes that result in an optimal skin scale length to sand particle size ratio in order to decrease the drag during sand-diving (Gidmark et al., 2011). Interfacial friction experiments by Martinez et al. (2019) revealed that artificial snakeskin-inspired surfaces with concave-up shaped features (i.e. with a positive CC, Figure 3b) generate greater frictional anisotropies (different friction coefficients in different directions) in sand than surfaces with concave down shaped features (i.e. with a negative CC). Skewness and kurtosis are parameters that have been used to describe the shape of surface features in engineering and biology (e.g. Wainwright et al., 2017; Whitehouse, 2004). For example, Baeckens et al. (2019) showed that the skewness and kurtosis of the dorsal scales of Anolis cristatellus lizards scaled with body size; intriguingly, no such trend was observed for the ventral scales. Scientists of various disciplines are encouraged to use QuSTo to study functional variation in the skin surface topography of different species for both fundamental and applied research (e.g. geotechnical engineering applications: Martinez et al., In Press; O’Hara & Martinez, 2020).
Understanding the functional and ecological significance of the diversity of skin surface design in snakes has been of interest to both biologist and engineers (e.g. Hazel et al., 1999; Marvi et al., 2014; Marvi & Hu, 2012). Several studies have already documented the basic macro-anatomy of skin surface structure for a large number of snake species, primarily from a systematics or a mechanical perspective (e.g. Dunson & Robinson, 1976; Jayne, 1988). Recently, the micro- and nano-structures that cover the skin surface of snakes have also been examined in an evolutionary framework (e.g. Arrigo et al., 2019). In contrast, the 3D surface characteristics of reptilian skin and its potential diversity among species occupying different environments has received limited attention. Our results suggest that skin surface roughness and basic topographical aspects of surface structure size and shape, such as scale height and surface roughness, show some interesting differences among snake species with distinct ecologies. One contrast is between arboreal and fossorial snakes, of which the former tends to have ventral scales with greater height compared to the latter. Previous research suggests that arboreal snakes may use their ventral scales in distinctive ways for climbing (Abdel-Aal, 2018; Jayne et al., 2015), yet further research is needed to address the functional significance of increased ventral scale height and surface roughness for locomotion on branches and trees. Our results also show that fossorial snake species are equipped with a relatively smooth skin surface on their ventrum. Similar findings have been reported from SEM images for the burrowing species Aspidelaps scutatus, Eryx jaculus and Gonglyophis colubrinus, which carry ventral scales with wide denticulations, no keels and oberhautchen cells of limited texture (Klein et al., 2010; Schmidt & Gorb, 2012). Increased smoothness on the ventral skin surface of fossorial limbless vertebrates is presumably a specialization for reducing friction while moving on or through sandy substrate (Gans, 1973; Gans & Baic, 1977). Beyond differences in skin roughness and scale height; however, we did not find strong ecological correlates with other aspects of skin surface topography, as denoted by convexity constant, skewness and kurtosis. One explanation for the lack of ecological patterns in morphological variation may be due to the existence of developmental constraints (Gould, 1989). Indeed, some features of snake scales are so highly phylogenetically conserved that they are used as a taxonomic tool (Price, 1982). Another possible explanation is that different skin surface structures may execute the same task equally well (many-to-one mapping; Wainwright, 2007) and are effective across a wide range of habitats. Clearly, further research is necessary to better understand the adaptive significance of the different aspects of skin surface topography in snakes.
ACKNOWLEDGEMENTS
The authors thank Sophia Palumbo, Osvaldo Villa and Hussein Alshawaf for their help with 3D scanning and Carol Spencer with selecting museum specimens. We thank the curators of the Museum of Vertebrate Zoology (MVZ) at UC Berkeley for the use of specimens, and the associate editor and two anonymous reviewers for providing valuable and constructive feedback on a previous version of the manuscript.
AUTHORS' CONTRIBUTIONS
A.M., D.J.I. and S.B. conceived the study; A.M. and D.N. collected 3D scans; D.N., M.S.B. and J.M. developed the application; S.B. performed phylogenetic comparative analyses; A.M., D.J.I. and S.B. wrote the manuscript and all authors contributed to editing the final paper.
Open Research
DATA AVAILABILITY STATEMENT
Codes are freely available in GitHub (https://github.com/GMLatUCDavis/QuSTo) and archived on Zenodo https://doi.org/10.5281/zenodo.4627805 (Martínez et al., 2021).