Learn R Programming

gdi (version 1.10.0)

Volumetric Analysis using Graphic Double Integration

Description

Tools implementing an automated version of the graphic double integration technique (GDI) for volume implementation, and some other related utilities for paleontological image-analysis. GDI was first employed by Jerison (1973) and Hurlburt (1999) and is primarily used for volume or mass estimation of (extinct) animals. The package 'gdi' aims to make this technique as convenient and versatile as possible. The core functions of 'gdi' provide utilities for automatically measuring diameters from digital silhouettes provided as image files and calculating volume via graphic double integration with simple elliptical, superelliptical (following Motani 2001 ) or complex cross-sectional geometries (see also Zhao 2024 ). Additionally, the package provides functions for estimating the center of mass position (COM), the moment of inertia (I) for 3D shapes and the second moment of area (Ix, Iy, Iz) of 2D cross-sections, as well as for the visualization of results.

Copy Link

Version

Install

install.packages('gdi')

Monthly Downloads

165

Version

1.10.0

License

GPL (>= 3)

Maintainer

Darius Nau

Last Published

November 25th, 2025

Functions in gdi (1.10.0)

rotI

Calculates the rotational inertia of a body. Only works with simple circular/elliptical and rectangular cross-sections, thus pixel-precise estimates are recommended.
sellipse

Estimate area of a superellipse. Assistant function for gdi.
sellipse.coo

calculate coordinates for plotting a superellipse for visualizing body cross-sections
transfer_ratio

Transfer a vector of aspect ratios onto another body profile
plot_sil

Plots a silhouette read by measuresil()
hCOM

Finds the horizontal (x axis, i.e. the axis vertical to the cross-sections) position of the center of mass (COM) of the volume. Experimental; only valid for "raw" gdi results with segment volumes approximated as elliptical prisms, or for manually supplied segment COMs. COM is calculated as a weighted mean of all segment COMs, with the segment mass as the weighting factor.
imghist

Simple histogram analysis for all color values in an input image. Can be used to help assess whether a chosen threshold value is appropriate for differentiating the silhouette from the background, or for general image analysis purposes.
expandConvexHull

Estimate soft tissue expansion factors following Macaulay et al. 2023
csI

Calculates the second moment of area (=area moment of inertia, Ix and Iy) and polar moment of inertia (Iz or J) for a cross-section given as an image.
fdetect

Tool to help determine which threshold value and method to use with measuresil() or cscorr(). The function analyzes all pixels along the edges of the image to determine the background color, to help with deciding on appropriate settings and avoid errors introduced by inappropriate settings
cscorr

Measure and analyze cross-sectional geometry supplied as an image.
gdi

Estimate volume using Graphic Double Integration.
inter_corr

Helper function for interpolating cross-sectional metrics over the length of a silhouette
measuresil

Take pixel-by-pixel measurements of a silhouette in jpeg or png format for use with the gdi function.
vCOM

Finds the vertical (y axis, i.e. the axis parallel to the cross-section diameter) position of the center of mass (COM) of the volume. Experimental; only valid for "raw" gdi results with segment volumes approximated as elliptical prisms, or for manually supplied segment COMs. COM is calculated as a weighted mean of all segment COMs, with the segment mass as the weighting factor. Estimates have lower accuracy compared to hCOM, because cross-sectional geometry and variation in density throughout the cross-section is not taken into account.