R: Calculations and Visualisations Related to Geometric Morphometrics

# Calculations and Visualisations Related to Geometric Morphometrics

## Documentation for package ‘Morpho’ version 2.13

- DESCRIPTION file
- Package NEWS

## Help Pages

A B C D E F G H I K L M N O P Q R S T U V W

Morpho-package | A toolbox providing methods for data-acquisition, visualisation and statistical methods related to Geometric Morphometrics and shape analysis

## -- A --

align2procSym | align new data to an existing Procrustes registration
angle.calc | calculate angle between two vectors
angleTest | Test whether the direction of two vectors is similar
anonymize | Replace ID-strings of data and associated files.
applyTransform | apply affine transformation to data
applyTransform.default | apply affine transformation to data
applyTransform.matrix | apply affine transformation to data
applyTransform.mesh3d | apply affine transformation to data
areaSphere | compute the area of an n-dimensional hypersphere
areaSpherePart | compute the area of an n-dimensional hypersphere cap
armaGinv | calculate Pseudo-inverse of a Matrix using RcppArmadillo
array2list | reverts list2array, converting an array to a list of matrices
arrMean3 | calculate mean of an array
asymPermute | Assess differences in amount and direction of asymmetric variation (only object symmetry)

## -- B --

barycenter | calculates the barycenters for all faces of a triangular mesh
bindArr | concatenate multiple arrays/matrices
bone1 | predefined colors for bone and skin
bone2 | predefined colors for bone and skin
bone3 | predefined colors for bone and skin
boneData | Landmarks and a triangular mesh
boneLM | Landmarks and a triangular mesh

## -- C --

CAC | calculate common allometric component
cExtract | extract information about fixed landmarks, curves and patches from and atlas generated by "landmark"
checkLM | Visually browse through a sample rendering its landmarks and corresponding surfaces.
checkNA | check for NA values in a matrix (of landmarks)
classify | classify specimen based on between-group PCA or CVA or typprobClass
classify.bgPCA | classify specimen based on between-group PCA or CVA or typprobClass
classify.CVA | classify specimen based on between-group PCA or CVA or typprobClass
classify.typprob | classify specimen based on between-group PCA or CVA or typprobClass
closemeshKD | Project coordinates onto a target triangular surface mesh.
colors | predefined colors for bone and skin
computeArea | Compute area enclosed within an irregular polygon
computeTransform | calculate an affine transformation matrix
covDist | calculates distances and PC-coordinates of covariance matrices
covPCA | calculates distances and PC-coordinates of covariance matrices
covW | calculate the pooled within groups covariance matrix
createAtlas | Create an atlas needed in placePatch
CreateL | Create Matrices necessary for Thin-Plate Spline
createMissingList | create a list with empty entries to be used as missingList in slider3d
crossProduct | calculate the orthogonal complement of a 3D-vector
cSize | calculate Centroid Size for a landmark configuration
cutMeshPlane | cut a mesh by a hyperplane and remove parts above/below that plane
cutSpace | separate a 3D-pointcloud by a hyperplane
CVA | Canonical Variate Analysis

## -- D --

data2platonic | creates 3D shapes from data to be saved as triangular meshes
deformGrid2d | visualise differences between two superimposed sets of 2D landmarks
deformGrid3d | visualise differences between two superimposed sets of 3D landmarks

## -- E --

equidistantCurve | make a curve equidistant (optionally up/downsampling)
export | plot or save the results of meshDist
export.meshDist | plot or save the results of meshDist
exVar | calculate variance of a distribution stemming from prediction models
exVar.lm | calculate variance of a distribution stemming from prediction models
exVar.mvr | calculate variance of a distribution stemming from prediction models

## -- F --

facenormals | Compute face or vertex normals of a triangular mesh
fastKmeans | fast kmeans clustering for 2D or 3D point clouds
file2mesh | Import 3D surface mesh files
find.outliers | Graphical interface to find outliers and/or to switch mislabeld landmarks
fixLMmirror | estimate missing landmarks from their bilateral counterparts
fixLMmirror.array | estimate missing landmarks from their bilateral counterparts
fixLMmirror.matrix | estimate missing landmarks from their bilateral counterparts
fixLMtps | estimate missing landmarks

## -- G --

getFaces | find indices of faces that contain specified vertices
getMeaningfulPCs | get number of meaningful Principal components
getOuterViewpoints | Get viewpoints on a sphere around a 3D mesh
getPCscores | Obtain PC-scores for new landmark data
getPCtol | determine the minimum ratio for two subsequent eigenvalues to be considered different
getPLSCommonShape | Get the linear combinations associated with the common shape change in each latent dimension of a pls2B
getPLSfromScores | compute changes associated with 2-Block PLS-scores
getPLSscores | compute 2-Block PLS scores for new data
getPointAlongOutline | Get a point along a line with a given distance from the start of the line
getSides | try to identify bilateral landmarks and sort them by side
getTrafo4x4 | get 4x4 Transformation matrix
getTrafo4x4.rotonto | get 4x4 Transformation matrix
getTrafoRotaxis | compute a 4x4 Transformation matrix for rotation around an arbitrary axis
getVisibleVertices | find vertices visible from a given viewpoints
groupPCA | Perform PCA based of the group means' covariance matrix

## -- H --

histGroup | plot histogram for multiple groups.

## -- I --

icpmat | match two landmark configurations using iteratively closest point search
ILDS | Compute Pairwise Landmark Distances
ILDSR2 | Compute R2 for Interlandmark Distances
inscribeEllipse | Inscribe the maximum ellipse into any arbitrary 2D polygon
inscribeEllipseRot | Inscribe the maximum ellipse into any arbitrary 2D polygon including rotations
invertFaces | invert faces' orientation of triangular mesh

## -- K --

kendalldist | Calculates the Riemannian distance between two superimposed landmark configs.

## -- L --

line2plane | get intersection between a line and a plane
lineplot | plot lines between landmarks
list2array | converts a list of matrices to an array
longnose.lm | landmarks and a triangular mesh representing a human nose
LPS2RAS | convert data from LPS to RAS space and back

## -- M --

mcNNindex | find nearest neighbours for 2D and 3D point clouds
mergeMeshes | merge multiple triangular meshes into a single one
mesh2grey | convert a colored mesh to greyscale.
mesh2obj | export mesh objects to disk
mesh2ply | export mesh objects to disk
meshcube | calculate the corners of a mesh's bouning box
meshDist | calculates and visualises distances between surface meshes or 3D coordinates and a surface mesh.
meshDist.matrix | calculates and visualises distances between surface meshes or 3D coordinates and a surface mesh.
meshDist.mesh3d | calculates and visualises distances between surface meshes or 3D coordinates and a surface mesh.
meshPlaneIntersect | get intersections between mesh and a plane
meshres | calculate average edge length of a triangular mesh
mirror | mirror landmarks or triangular mesh in place
mirror.matrix | mirror landmarks or triangular mesh in place
mirror.mesh3d | mirror landmarks or triangular mesh in place
mirror2plane | mirror points or mesh on an arbitrary plane
mirror2plane.matrix | mirror points or mesh on an arbitrary plane
mirror2plane.mesh3d | mirror points or mesh on an arbitrary plane
Morpho | A toolbox providing methods for data-acquisition, visualisation and statistical methods related to Geometric Morphometrics and shape analysis

## -- N --

name2factor | extract data from array names
name2num | extract data from array names
NNshapeReg | Estimate the shape by averaging the shape of the nearest neighbours.
nose | landmarks and a triangular mesh representing a human nose

## -- O --

obj2mesh | Import 3D surface mesh files

## -- P --

pcAlign | align two 3D-pointclouds/meshes by their principal axes
pcAlign.matrix | align two 3D-pointclouds/meshes by their principal axes
pcAlign.mesh3d | align two 3D-pointclouds/meshes by their principal axes
pcaplot3d | visualization of shape variation
pcaplot3d.nosymproc | visualization of shape variation
pcaplot3d.symproc | visualization of shape variation
PCdist | correlation between a reduced space and the original space
permudist | performs permutation testing for group differences.
permuvec | perfom permutation testing on angles and distances between subgroups of two major groups.
placePatch | Project semi-landmarks from a predefined atlas onto all specimen in a sample
plot.ILDSR2 | Plot graphical report for ILDSR2
plot.slider3d | plot the result of slider3d
plotAtlas | visualize an atlas defined by createAtlas
plotNormals | plots the normals of a triangular surface mesh.
pls2B | Two-Block partial least square regression.
plsCoVar | Get the shape changes from pls2B associated with each latent variable
plsCoVarCommonShape | Compute the shape changes along the common axis of deformations
ply2mesh | Import 3D surface mesh files
points2plane | projects a 3D coordinate orthogonally onto a plane
prcompfast | fast Principal Component Analysis (PCA)
predict.bgPCA | Compute between-group-PC scores from new data
predict.CVA | Compute CV-scores from new data
predictPLSfromData | predict 2 Block-PLS from new data
predictPLSfromScores | predict data from 2-Block PLS-scores
predictRelWarps | predict relative warps for data not included in the training data set
predictShape.lm | Predict shapes based on linear models calculated from PCscores
proc.weight | calculate weights inverse to the distances from the specified observation.
procAOVsym | Procrustes ANOVA for structures with object symmetry
ProcGPA | Workhorse function for procSym, responsible for Procrustes registration
procSym | Procrustes registration
projRead | Project points onto the closest point on a mesh

## -- Q --

qqmat | Q-Q plot to assess normality of data
quad2trimesh | converts a mesh containing quadrangular faces into one only consisting of triangles

## -- R --

r2morphoj | Export data to MorphoJ and Morphologika
r2morphologika | Export data to MorphoJ and Morphologika
ray2mesh | projects the vertices of a mesh along its normals onto the surface of another one.
read.csv.folder | batch import data from files
read.fcsv | read fiducials from slicer4
read.lmdta | read dta files
read.mpp | Read saved pick-points from meshlab
read.pts | reads pts files
read.slicerjson | read Landmarks from Slicer in Json format
readallTPS | Import landmarks and outlines from TPS files
readLandmarks.csv | import landmark data from csv files
regdist | correlation between shape space and tangent space
RegScore | calulate regression scores for linear model
relaxLM | relax one specific landmark configuration against a reference
relaxLM.matrix | relax one specific landmark configuration against a reference
relaxLM.mesh3d | relax one specific landmark configuration against a reference
relWarps | calculate relative Warp analysis
render | plot or save the results of meshDist
render.matrixDist | plot or save the results of meshDist
render.meshDist | plot or save the results of meshDist
resampleCurve | Resample a curve equidistantly
restoreFromPCA | restore original data from PCA
restoreShapes | restore shapes from PC-Scores or similar projections
retroDeform3d | symmetrize a bilateral landmark configuration
retroDeformMesh | symmetrize a triangular mesh
rmUnrefVertex | some little helpers for vertex operations on triangular meshes
rmVertex | some little helpers for vertex operations on triangular meshes
rotaxis3d | Rotate an object (matrix or mesh) around an arbitrary axis in 3D
rotaxis3d.matrix | Rotate an object (matrix or mesh) around an arbitrary axis in 3D
rotaxis3d.mesh3d | Rotate an object (matrix or mesh) around an arbitrary axis in 3D
rotaxisMat | calculate a rotation matrix around an arbitrary axis through the origin in 3D
rotmesh.onto | rotate ,scale and translate a mesh based on landmark information.
rotonmat | rotate matrix of landmarks
rotonto | rotates, translates and scales one matrix onto an other using Procrustes fitting
rotreverse | rotates, translates and scales one matrix onto an other using Procrustes fitting
rotreverse.matrix | rotates, translates and scales one matrix onto an other using Procrustes fitting
rotreverse.mesh3d | rotates, translates and scales one matrix onto an other using Procrustes fitting

## -- S --

scalemesh | scale a mesh of class "mesh3d"
shortnose.lm | landmarks and a triangular mesh representing a human nose
shortnose.mesh | landmarks and a triangular mesh representing a human nose
skin1 | predefined colors for bone and skin
skin2 | predefined colors for bone and skin
skin3 | predefined colors for bone and skin
skin4 | predefined colors for bone and skin
skull_0144_ch_fe.mesh | Landmarks and a triangular mesh
slider2d | slides Semilandmarks along curves 2D by minimising bending energy of a thin-plate spline deformation.
slider3d | slides Semilandmarks along curves and surfaces in 3D by minimising bending energy of a thin-plate spline deformation.
solutionSpace | returns the solution space (basis and translation vector) for an equation system
sortCurve | sort curvepoints by using the subsequent neighbours
symmetrize | create a perfectly symmetric version of landmarks

## -- T --

tangentPlane | calculate the orthogonal complement of a 3D-vector
tps2d | thin plate spline mapping (2D and 3D) for coordinates and triangular meshes
tps3d | thin plate spline mapping (2D and 3D) for coordinates and triangular meshes
typprob | calculate typicality probabilities
typprobClass | calculate typicality probabilities

## -- U --

unrefVertex | some little helpers for vertex operations on triangular meshes
updateIndices | update a vector of indices after removal of some referenced items
updateNormals | Compute face or vertex normals of a triangular mesh

## -- V --

vecx | convert an 3D array into a matrix and back
vert2points | some little helpers for vertex operations on triangular meshes
virtualMeshScan | remove all parts of a triangular mesh, not visible from a set of viewpoints
visualise | Plot the ILDS with the relevant ILDS ighlighted
visualise.ILDSR2 | Plot the ILDS with the relevant ILDS ighlighted
visualize | Plot the ILDS with the relevant ILDS ighlighted
visualize.ILDSR2 | Plot the ILDS with the relevant ILDS ighlighted

## -- W --

warpmovie2d | Creates a sequence of images showing predefined steps of warping two meshes or landmark configurations (2D and 3D) into each other
warpmovie3d | Creates a sequence of images showing predefined steps of warping two meshes or landmark configurations (2D and 3D) into each other
warpmovie3d.matrix | Creates a sequence of images showing predefined steps of warping two meshes or landmark configurations (2D and 3D) into each other
warpmovie3d.mesh3d | Creates a sequence of images showing predefined steps of warping two meshes or landmark configurations (2D and 3D) into each other
write.fcsv | write fiducials in slicer4 format
write.pts | exports a matrix containing landmarks into .pts format
write.slicerjson | Export landmarks (or any 3D coordinates) to the new slicer json format