Learn R Programming

⚠️There's a newer version (2.12) of this package.Take me there.

Morpho (version 2.6)

Calculations and Visualisations Related to Geometric Morphometrics

Description

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.

Copy Link

Version

Install

install.packages('Morpho')

Monthly Downloads

1,401

Version

2.6

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Stefan Schlager

Last Published

April 24th, 2018

Functions in Morpho (2.6)

asymPermute

Assess differences in amount and direction of asymmetric variation (only object symmetry)
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.
applyTransform

apply affine transformation to data
data2platonic

creates 3D shapes from data to be saved as triangular meshes
find.outliers

Graphical interface to find outliers and/or to switch mislabeld landmarks
fastKmeans

fast kmeans clustering for 2D or 3D point clouds
anonymize

Replace ID-strings of data and associated files.
cSize

calculate Centroid Size for a landmark configuration
equidistantCurve

make a curve equidistant (optionally up/downsampling)
cutSpace

separate a 3D-pointcloud by a hyperplane
closemeshKD

Project coordinates onto a target triangular surface mesh.
classify

classify specimen based on between-group PCA or CVA or typprobClass
colors

predefined colors for bone and skin
exVar

calculate variance of a distribution stemming from prediction models
histGroup

plot histogram for multiple groups.
barycenter

calculates the barycenters for all faces of a triangular mesh
getPCtol

determine the minimum ratio for two subsequent eigenvalues to be considered different
bindArr

concatenate multiple arrays/matrices
icpmat

match two landmark configurations using iteratively closest point search
getPLSCommonShape

Get the linear combinations associated with the common shape change in each latent dimension of a pls2B
boneData

Landmarks and a triangular mesh
line2plane

get intersection between a line and a plane
lineplot

plot lines between landmarks
pcAlign

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

Get the shape changes from pls2B associated with each latent variable
createMissingList

create a list with empty entries to be used as missingList in slider3d
nose

landmarks and a triangular mesh representing a human nose
getPLSfromScores

compute changes associated with 2-Block PLS-scores
covW

calculate the pooled within groups covariance matrix
computeTransform

calculate an affine transformation matrix
getPLSscores

compute 2-Block PLS scores for new data
createAtlas

Create an atlas needed in placePatch
plsCoVarCommonShape

Compute the shape changes along the common axis of deformations
predictPLSfromScores

predict data from 2-Block PLS-scores
covDist

calculates distances and PC-coordinates of covariance matrices
deformGrid2d

visualise differences between two superimposed sets of 2D landmarks
predictRelWarps

predict relative warps for data not included in the training data set
deformGrid3d

visualise differences between two superimposed sets of 3D landmarks
fixLMmirror

estimate missing landmarks from their bilateral counterparts
mergeMeshes

merge multiple triangular meshes into a single one
mesh2grey

convert a colored mesh to greyscale.
pcaplot3d

visualization of shape variation
points2plane

projects a 3D coordinate orthogonally onto a plane
permudist

performs permutation testing for group differences.
file2mesh

Import 3D surface mesh files
ray2mesh

projects the vertices of a mesh along its normals onto the surface of another one.
fixLMtps

estimate missing landmarks
getFaces

find indices of faces that contain specified vertices
read.csv.folder

batch import data from files
rotonto

rotates, translates and scales one matrix onto an other using Procrustes fitting
cutMeshPlane

cut a mesh by a hyperplane and remove parts above/below that plane
getMeaningfulPCs

get number of meaningful Principal components
projRead

Project points onto the closest point on a mesh
getOuterViewpoints

Get viewpoints on a sphere around a 3D mesh
getPCscores

Obtain PC-scores for new landmark data
scalemesh

scale a mesh of class "mesh3d"
typprob

calculate typicality probabilities
invertFaces

invert faces' orientation of triangular mesh
getVisibleVertices

find vertices visible from a given viewpoints
updateNormals

Compute face or vertex normals of a triangular mesh
kendalldist

Calculates the Riemannian distance between two superimposed landmark configs.
groupPCA

Perform PCA based of the group means' covariance matrix
mesh2obj

export mesh objects to disk
meshDist

calculates and visualises distances between surface meshes or 3D coordinates and a surface mesh.
qqmat

Q-Q plot to assess normality of data
regdist

correlation between shape space and tangent space
meshcube

calculate the corners of a mesh's bouning box
write.fcsv

write fiducials in slicer4 format
relWarps

calculate relative Warp analysis
meshPlaneIntersect

get intersections between mesh and a plane
meshres

calculate average edge length of a triangular mesh
rotmesh.onto

rotate ,scale and translate a mesh based on landmark information.
prcompfast

fast Principal Component Analysis (PCA)
mirror

mirror landmarks or triangular mesh in place
rotonmat

rotate matrix of landmarks
write.pts

exports a matrix containing landmarks into .pts format
crossProduct

calculate the orthogonal complement of a 3D-vector
permuvec

perfom permutation testing on angles and distances between subgroups of two major groups.
plot.slider3d

plot the result of slider3d
predictPLSfromData

predict 2 Block-PLS from new data
placePatch

Project semi-landmarks from a predefined atlas onto all specimen in a sample
getTrafo4x4

get 4x4 Transformation matrix
procAOVsym

Procrustes ANOVA for structures with object symmetry
tps3d

thin plate spline mapping (2D and 3D) for coordinates and triangular meshes
procSym

Procrustes registration
plotAtlas

visualize an atlas defined by createAtlas
getTrafoRotaxis

compute a 4x4 Transformation matrix for rotation around an arbitrary axis
readLandmarks.csv

import landmark data from csv files
mcNNindex

find nearest neighbours for 2D and 3D point clouds
predictShape.lm

Predict shapes based on linear models calculated from PCscores
list2array

converts a list of matrices to an array
readallTPS

Import landmarks and outlines from TPS files
rotaxis3d

Rotate an object (matrix or mesh) around an arbitrary axis in 3D
name2factor

extract data from array names
mirror2plane

mirror points or mesh on an arbitrary plane
rotaxisMat

calculate a rotation matrix around an arbitrary axis through the origin in 3D
proc.weight

calculate weights inverse to the distances from the specified observation.
read.fcsv

read fiducials from slicer4
plotNormals

plots the normals of a triangular surface mesh.
pls2B

Two-Block partial least square regression.
read.lmdta

read dta files
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
relaxLM

relax one specific landmark configuration against a reference
quad2trimesh

converts a mesh containing quadrangular faces into one only consisting of triangles
render

plot or save the results of meshDist
r2morphoj

Export data to MorphoJ and Morphologika
showPC

convert PCs to landmark configuration
slider2d

slides Semilandmarks along curves 2D by minimising bending energy of a thin-plate spline deformation.
read.mpp

Read saved pick-points from meshlab
virtualMeshScan

remove all parts of a triangular mesh, not visible from a set of viewpoints
warpmovie3d

Creates a sequence of images showing predefined steps of warping two meshes or landmark configurations (2D and 3D) into each other
read.pts

reads pts files
retroDeform3d

symmetrize a bilateral landmark configuration
retroDeformMesh

symmetrize a triangular mesh
sortCurve

sort curvepoints by using the subsequent neighbours
symmetrize

create a perfectly symmetric version of landmarks
vecx

convert an 3D array into a matrix and back
unrefVertex

some little helpers for vertex operations on triangular meshes
RegScore

calulate regression scores for linear model
ProcGPA

Workhorse function for procSym, responsible for Procrustes registration
NNshapeReg

Estimate the shape by averaging the shape of the nearest neighbours.
CAC

calculate common allometric component
Morpho-package

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

deprecated functions of Morpho
align2procSym

align new data to an existing Procrustes registration
PCdist

correlation between a reduced space and the original space
CVA

Canonical Variate Analysis
arrMean3

calculate mean of an array
CreateL

Create Matrices necessary for Thin-Plate Spline
armaGinv

calculate Pseudo-inverse of a Matrix using RcppArmadillo
areaSphere

compute the area of an n-dimensional hypersphere
areaSpherePart

compute the area of an n-dimensional hypersphere cap
angleTest

Test whether the direction of two vectors is similar
angle.calc

calculate angle between two vectors