Morpho: Calculations and Visualisations Related to Geometric Morphometrics

A toolset for Geometric Morphometrics and mesh processing. This includes (among other stuff) mesh deformations based on reference points, permutation tests, detection of outliers, processing of sliding semi-landmarks and semi-automated surface landmark placement.

Install the latest version of this package by entering the following in R:
AuthorStefan Schlager [aut, cre, cph], Gregory Jefferis [ctb]
Date of publication2017-04-21 05:52:53 UTC
MaintainerStefan Schlager <>

View on CRAN

Man pages

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

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

arrMean3: calculate mean of an array

asymPermute: Assess differences in amount and direction of asymmetric...

barycenter: calculates the barycenters for all faces of a triangular mesh

bindArr: concatenate multiple arrays/matrices

boneData: Landmarks and a triangular mesh

CAC: calculate common allometric component

cExtract: extract information about fixed landmarks, curves and patches...

checkLM: Visually browse through a sample rendering its landmarks and...

classify: classify specimen based on between-group PCA or CVA or...

closemeshKD: Project coordinates onto a target triangular surface mesh.

colors: predefined colors for bone and skin

computeTransform: calculate an affine transformation matrix

covDist: calculates distances and PC-coordinates of covariance...

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...

cSize: calculate Centroid Size for a landmark configuration

cutMeshPlane: cut a mesh by a hyperplane and remove parts above/below that...

cutSpace: separate a 3D-pointcloud by a hyperplane

CVA: Canonical Variate Analysis

deformGrid2d: visualise differences between two superimposed sets of 2D...

deformGrid3d: visualise differences between two superimposed sets of 3D...

equidistantCurve: make a curve equidistant (optionally up/downsampling)

exVar: calculate variance of a distribution stemming from prediction...

fastKmeans: fast kmeans clustering for 2D or 3D point clouds

find.outliers: Graphical interface to find outliers and/or to switch...

fixLMmirror: estimate missing landmarks from their bilateral counterparts

fixLMtps: estimate missing landmarks

getFaces: find indices of faces that contain specified vertices

getMeaningfulPCs: get number of meaningful Principal components

getPCtol: determine the minimum ratio for two subsequent eigenvalues to...

getPLSfromScores: compute changes associated with 2-Block PLS-scores

getPLSscores: compute 2-Block PLS scores for new data

getTrafo4x4: get 4x4 Transformation matrix

getTrafoRotaxis: compute a 4x4 Transformation matrix for rotation around an...

groupPCA: Perform PCA based of the group means' covariance matrix

histGroup: plot histogram for multiple groups.

icpmat: match two landmark configurations using iteratively closest...

invertFaces: invert faces' orientation of triangular mesh

kendalldist: Calculates the Riemannian distance between two superimposed...

line2plane: get intersection between a line and a plane

lineplot: plot lines between landmarks

list2array: converts a list of matrices to an array

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.

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...

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

mirror2plane: mirror points or mesh on an arbitrary plane

Morpho-deprecated: deprecated functions of Morpho

Morpho-package: A toolbox providing methods for data-acquisition,...

name2factor: extract data from array names

NNshapeReg: Estimate the shape by averaging the shape of the nearest...

nose: landmarks and a triangular mesh representing a human nose

pcAlign: align two 3D-pointclouds/meshes by their principal axes

pcaplot3d: 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...

placePatch: Project semi-landmarks from a predefined atlas onto all...

plotAtlas: visualize an atlas defined by createAtlas

plotNormals: plots the normals of a triangular surface mesh.

plot.slider3d: plot the result of slider3d

pls2B: Two-Block partial least square regression.

plsCoVar: Get the shape changes from pls2B associated with each latent...

ply2mesh: Import 3D surface mesh files

points2plane: projects a 3D coordinate orthogonally onto a plane

prcompfast: fast Principal Component Analysis (PCA)

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...

predictShape.lm: Predict shapes based on linear models calculated from...

procAOVsym: Procrustes ANOVA for structures with object symmetry

ProcGPA: Workhorse function for procSym, responsible for Procrustes...

procSym: Procrustes registration

proc.weight: calculate weights inverse to the distances from the specified...

projRead: Project points onto the closest point on a mesh

qqmat: Q-Q plot to assess normality of data

quad2trimesh: converts a mesh containing quadrangular faces into one only...

r2morphoj: Export data to MorphoJ and Morphologika

ray2mesh: projects the vertices of a mesh along its normals onto the...

readallTPS: Import landmarks and outlines from TPS files

read.csv.folder: batch import data from files

read.fcsv: read fiducials from slicer4

readLandmarks.csv: import landmark data from csv files

read.lmdta: read dta files

read.mpp: Read saved pick-points from meshlab

read.pts: reads pts 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

relWarps: calculate relative Warp analysis

render: plot or save the results of meshDist

retroDeform3d: symmetrize a bilateral landmark configuration

retroDeformMesh: symmetrize a triangular mesh

rotaxis3d: Rotate an object (matrix or mesh) around an arbitrary axis in...

rotaxisMat: calculate a rotation matrix around an arbitrary axis through...

rotmesh.onto: rotate ,scale and translate a mesh based on landmark...

rotonmat: rotate matrix of landmarks

rotonto: rotates, translates and scales one matrix onto an other using...

scalemesh: scale a mesh of class "mesh3d"

showPC: convert PCs to landmark configuration

slider2d: slides Semilandmarks along curves 2D by minimising bending...

slider3d: slides Semilandmarks along curves and surfaces in 3D by...

solutionSpace: returns the solution space (basis and translation vector) for...

sortCurve: sort curvepoints by using the subsequent neighbours

symmetrize: create a perfectly symmetric version of landmarks

tangentPlane: calculate the orthogonal complement of a 3D-vector

tps3d: thin plate spline mapping (2D and 3D) for coordinates and...

typprob: calculate typicality probabilities

updateNormals: Compute face or vertex normals of a triangular mesh

vecx: convert an 3D array into a matrix and back

vertex: some little helpers for vertex operations on triangular...

warpmovie3d: Creates a sequence of images showing predefined steps of...

write.fcsv: write fiducials in slicer4 format

write.pts: exports a matrix containing landmarks into .pts format


adnormals Man page
align2procSym Man page
angle.calc Man page
angleTest Man page
anonymize Man page
applyTransform Man page
applyTransform.default Man page
applyTransform.matrix Man page
applyTransform.mesh3d Man page
areaSphere Man page
areaSpherePart Man page
armaGinv Man page
arrMean3 Man page
asymPermute Man page
barycenter Man page
bindArr Man page
bone1 Man page
bone2 Man page
bone3 Man page
boneData Man page
boneLM Man page
CAC Man page
cExtract Man page
checkLM Man page
classify Man page
classify.bgPCA Man page
classify.CVA Man page
classify.typprob Man page
closemeshKD Man page
colors Man page
computeTransform Man page
conv2backf Man page
covDist Man page
covPCA Man page
covW Man page
createAtlas Man page
CreateL Man page
createMissingList Man page
crossp Man page
crossProduct Man page
cSize Man page
cutMeshPlane Man page
cutSpace Man page
CVA Man page
deform.grid Man page
deformGrid2d Man page
deformGrid3d Man page
deprecated Man page
equidistantCurve Man page
export Man page
export.meshDist Man page
exVar Man page
exVar.lm Man page
exVar.mvr Man page
facenormals Man page
fastKmeans Man page
file2mesh Man page
find.outliers Man page
fixLMmirror Man page
fixLMmirror.array Man page
fixLMmirror.matrix Man page
fixLMtps Man page
getFaces Man page
getMeaningfulPCs Man page
getPCtol Man page
getPLSfromScores Man page
getPLSscores Man page
getTrafo4x4 Man page
getTrafo4x4.rotonto Man page
getTrafoRotaxis Man page
groupPCA Man page
histGroup Man page
icpmat Man page
invertFaces Man page
kendalldist Man page
line2plane Man page
lineplot Man page
list2array Man page
longnose.lm Man page
mcNNindex Man page
mergeMeshes Man page
mesh2grey Man page
mesh2obj Man page
mesh2ply Man page
meshcube Man page
meshDist Man page
meshDist.matrix Man page
meshDist.mesh3d Man page
meshPlaneIntersect Man page
meshres Man page
mirror Man page
mirror2plane Man page
mirror2plane.matrix Man page
mirror2plane.mesh3d Man page
mirror.matrix Man page
mirror.mesh3d Man page
Morpho Man page
Morpho-package Man page
name2factor Man page
name2num Man page
NNshapeReg Man page
nose Man page
obj2mesh Man page
pcAlign Man page
pcAlign.matrix Man page
pcAlign.mesh3d Man page
pcaplot3d Man page
pcaplot3d.nosymproc Man page
pcaplot3d.symproc Man page
PCdist Man page
permudist Man page
permuvec Man page
placePatch Man page
plotAtlas Man page
plotNormals Man page
plot.slider3d Man page
pls2B Man page
plsCoVar Man page
ply2mesh Man page
points2plane Man page
prcompfast Man page
predictPLSfromData Man page
predictPLSfromScores Man page
predictRelWarps Man page
predictShape.lm Man page
procAOVsym Man page
ProcGPA Man page
procSym Man page
proc.weight Man page
projRead Man page
qqmat Man page
quad2trimesh Man page
r2morphoj Man page
r2morphologika Man page
ray2mesh Man page
readallTPS Man page
read.csv.folder Man page
read.fcsv Man page
readLandmarks.csv Man page
read.lmdta Man page
read.mpp Man page
read.pts Man page
regdist Man page
regdist.raw Man page
RegScore Man page
relaxLM Man page
relaxLM.matrix Man page
relaxLM.mesh3d Man page
relWarps Man page
render Man page
render.matrixDist Man page
render.meshDist Man page
retroDeform3d Man page
retroDeformMesh Man page
rmUnrefVertex Man page
rmVertex Man page
rotaxis3d Man page
rotaxis3d.matrix Man page
rotaxis3d.mesh3d Man page
rotaxisMat Man page
rotmesh.onto Man page
rotonmat Man page
rotonto Man page
rotreverse Man page
rotreverse.matrix Man page
rotreverse.mesh3d Man page
scalemesh Man page
shortnose.lm Man page
shortnose.mesh Man page
showPC Man page
skin1 Man page
skin2 Man page
skin3 Man page
skin4 Man page
skull_0144_ch_fe.mesh Man page
slider2d Man page
slider3d Man page
solutionSpace Man page
sortCurve Man page
symmetrize Man page
tangentPlane Man page
tanplan Man page
tps2d Man page
tps3d Man page
typprob Man page
typprobClass Man page
unrefVertex Man page
updateNormals Man page
vecx Man page
vert2points Man page
warp.mesh Man page
warpmovie2d Man page
warpmovie3d Man page
warpmovie3d.matrix Man page
warpmovie3d.mesh3d Man page
write.fcsv Man page
write.pts Man page


tests/testthat/test-pls2B.r tests/testthat/test-mirror.r tests/testthat/test-relWarps.r tests/testthat/test-CVA.r
R/procAOVsym.r R/typprob.r R/deformGrid2d.r R/difplot.lm.r R/closemeshKD.r R/plot.normals.r R/relwarps.r R/relax.lm.r R/armaGinv.r R/ProcGPA.r R/applyTransform.r R/line2plane.r R/cSize.r R/projRead.r R/scaleproc.r R/vecx.r R/solutionSpace.r R/mergeMeshes.r R/readallTPS.r R/list2array.r R/CVAdists.r R/name2.r R/obj2mesh.r R/regdist.raw.r R/eigenPCA.r R/read.pts.r R/meshcube.r R/histGroup.r R/createVarTable.r R/points2plane.r R/showPC.r R/calcTang_U.r R/CVA.crova.r R/classify.r R/write.pts.r R/PCmeaning.r R/orp.r R/asymPermu.r R/addo.r R/meshDist.r R/pcaplot3d.r R/deform.grid.r R/meshPlaneIntersect.r R/prcompfast.r R/tanplan.r R/place.patch.r R/angle.calc.r R/onUnload.r R/difplot.lm2D.r R/groupPCA.r R/fiducials.r R/calcGamma.r R/barycenter.r R/createMissingList.r R/groupPCAcrova.r R/calcTang_U_s.r R/equidistantCurve.r R/rotmesh.onto.r R/rotonmat.r R/mirror.r R/cutSpace.r R/quad2trimesh.r R/mesh2grey.r R/lineplot.r R/vertex.r R/meshDistZExport.r R/icpmat.r R/check.lm.r R/meshDistMatrix.r R/ray2mesh.r R/read.mpp.r R/ply2mesh.r R/meshres.r R/permudist.r R/file2mesh.r R/CAC.r R/pls2B.r R/ignoreNA.r R/permuvec.r R/proc.weight.r R/r2morphoj.r R/r2morphologika.r R/warpmovie.matrix.r R/colors.r R/gdif.r R/anonymize.r R/NNshapeReg.r R/Atlas.r R/CreateL.r R/fixLMtps.r R/fx.r R/PCdist.r R/find.outliers.r R/updateNormals.r R/fastKmeans.r R/slider2d.r R/mcNNindex.r R/mesh2ply.r R/RegScore.r R/kendalldist.r R/ang.r R/rot.proc.r R/covDist.r R/write.obj.r R/ComputeTransform.r R/tps3d.r R/read.lmdta.r R/rotaxis.r R/rotonto.r R/readLandmarks.csv.r R/predictShape.lm.r R/retrodeform.r R/bindArr.r R/crossp.r R/mesh2obj.r R/Morpho-package.R R/warpmovie.r R/read.obj.r R/exVar.r R/symmetrize.r R/slider3d.r R/pcAlign.r R/scalemesh.r R/cExtract.r R/angleTest.r R/read.csv.folder.r R/CVA.r R/conv2backf.r R/procSym.r R/qqmat.r R/fixLMmirror.r
man/updateNormals.Rd man/applyTransform.Rd man/meshPlaneIntersect.Rd man/slider2d.Rd man/line2plane.Rd man/kendalldist.Rd man/plsCoVar.Rd man/CVA.Rd man/deformGrid2d.Rd man/mesh2grey.Rd man/areaSpherePart.Rd man/asymPermute.Rd man/quad2trimesh.Rd man/predictRelWarps.Rd man/read.pts.Rd man/write.pts.Rd man/cutSpace.Rd man/solutionSpace.Rd man/invertFaces.Rd man/mirror2plane.Rd man/checkLM.Rd man/plotNormals.Rd man/rotaxis3d.Rd man/rotonmat.Rd man/typprob.Rd man/retroDeformMesh.Rd man/read.mpp.Rd man/predictShape.lm.Rd man/exVar.Rd man/rotaxisMat.Rd man/pcAlign.Rd man/mergeMeshes.Rd man/proc.weight.Rd man/ply2mesh.Rd man/prcompfast.Rd man/barycenter.Rd man/read.csv.folder.Rd man/sortCurve.Rd man/placePatch.Rd man/pcaplot3d.Rd man/procSym.Rd man/readallTPS.Rd man/ProcGPA.Rd man/armaGinv.Rd man/render.Rd man/cSize.Rd man/qqmat.Rd man/pls2B.Rd man/relaxLM.Rd man/classify.Rd man/predictPLSfromScores.Rd man/cutMeshPlane.Rd man/getTrafo4x4.Rd man/vecx.Rd man/r2morphoj.Rd man/projRead.Rd man/cExtract.Rd man/readLandmarks.csv.Rd man/mesh2ply.Rd man/Morpho-package.Rd man/align2procSym.Rd man/name2factor.Rd man/getPLSscores.Rd man/find.outliers.Rd man/points2plane.Rd man/getPCtol.Rd man/meshDist.Rd man/tps3d.Rd man/meshcube.Rd man/mirror.Rd man/covW.Rd man/lineplot.Rd man/angleTest.Rd man/histGroup.Rd man/deformGrid3d.Rd man/Morpho-deprecated.Rd man/angle.calc.Rd man/showPC.Rd man/meshres.Rd man/retroDeform3d.Rd man/plot.slider3d.Rd man/read.lmdta.Rd man/write.fcsv.Rd man/list2array.Rd man/rotmesh.onto.Rd man/permuvec.Rd man/createMissingList.Rd man/equidistantCurve.Rd man/bindArr.Rd man/permudist.Rd man/getFaces.Rd man/groupPCA.Rd man/PCdist.Rd man/relWarps.Rd man/procAOVsym.Rd man/CreateL.Rd man/closemeshKD.Rd man/predictPLSfromData.Rd man/vertex.Rd man/fixLMtps.Rd man/mcNNindex.Rd man/computeTransform.Rd man/CAC.Rd man/ray2mesh.Rd man/rotonto.Rd man/boneData.Rd man/read.fcsv.Rd man/createAtlas.Rd man/areaSphere.Rd man/fixLMmirror.Rd man/tangentPlane.Rd man/warpmovie3d.Rd man/RegScore.Rd man/getPLSfromScores.Rd man/symmetrize.Rd man/scalemesh.Rd man/getMeaningfulPCs.Rd man/regdist.Rd man/slider3d.Rd man/colors.Rd man/NNshapeReg.Rd man/covDist.Rd man/nose.Rd man/fastKmeans.Rd man/anonymize.Rd man/plotAtlas.Rd man/icpmat.Rd man/getTrafoRotaxis.Rd man/arrMean3.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.