Learn R Programming

Morpho (version 2.12)

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,457

Version

2.12

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

December 6th, 2023

Functions in Morpho (2.12)

armaGinv

calculate Pseudo-inverse of a Matrix using RcppArmadillo
array2list

reverts list2array, converting an array to a list of matrices
asymPermute

Assess differences in amount and direction of asymmetric variation (only object symmetry)
closemeshKD

Project coordinates onto a target triangular surface mesh.
classify

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

calculates the barycenters for all faces of a triangular mesh
checkLM

Visually browse through a sample rendering its landmarks and corresponding surfaces.
checkNA

check for NA values in a matrix (of landmarks)
cutMeshPlane

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

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

calculate Centroid Size for a landmark configuration
anonymize

Replace ID-strings of data and associated files.
covW

calculate the pooled within groups covariance matrix
createAtlas

Create an atlas needed in placePatch
cExtract

extract information about fixed landmarks, curves and patches from and atlas generated by "landmark"
boneData

Landmarks and a triangular mesh
computeTransform

calculate an affine transformation matrix
covDist

calculates distances and PC-coordinates of covariance matrices
bindArr

concatenate multiple arrays/matrices
fastKmeans

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

creates 3D shapes from data to be saved as triangular meshes
equidistantCurve

make a curve equidistant (optionally up/downsampling)
cutSpace

separate a 3D-pointcloud by a hyperplane
find.outliers

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

visualise differences between two superimposed sets of 2D landmarks
deformGrid3d

visualise differences between two superimposed sets of 3D landmarks
colors

predefined colors for bone and skin
getFaces

find indices of faces that contain specified vertices
getMeaningfulPCs

get number of meaningful Principal components
getPCscores

Obtain PC-scores for new landmark data
getOuterViewpoints

Get viewpoints on a sphere around a 3D mesh
getPCtol

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

estimate missing landmarks
computeArea

Compute area enclosed within an irregular polygon
fixLMmirror

estimate missing landmarks from their bilateral counterparts
list2array

converts a list of matrices to an array
mcNNindex

find nearest neighbours for 2D and 3D point clouds
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
lineplot

plot lines between landmarks
getTrafoRotaxis

compute a 4x4 Transformation matrix for rotation around an arbitrary axis
mesh2obj

export mesh objects to disk
line2plane

get intersection between a line and a plane
getTrafo4x4

get 4x4 Transformation matrix
groupPCA

Perform PCA based of the group means' covariance matrix
mergeMeshes

merge multiple triangular meshes into a single one
getVisibleVertices

find vertices visible from a given viewpoints
getPLSCommonShape

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

extract data from array names
mirror2plane

mirror points or mesh on an arbitrary plane
mirror

mirror landmarks or triangular mesh in place
meshres

calculate average edge length of a triangular mesh
mesh2grey

convert a colored mesh to greyscale.
pcaplot3d

visualization of shape variation
permudist

performs permutation testing for group differences.
getPLSscores

compute 2-Block PLS scores for new data
exVar

calculate variance of a distribution stemming from prediction models
histGroup

plot histogram for multiple groups.
getPLSfromScores

compute changes associated with 2-Block PLS-scores
permuvec

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

plot the result of slider3d
predictPLSfromScores

predict data from 2-Block PLS-scores
plotAtlas

visualize an atlas defined by createAtlas
predictRelWarps

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

plots the normals of a triangular surface mesh.
pls2B

Two-Block partial least square regression.
icpmat

match two landmark configurations using iteratively closest point search
nose

landmarks and a triangular mesh representing a human nose
meshDist

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

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

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

Compute the shape changes along the common axis of deformations
invertFaces

invert faces' orientation of triangular mesh
meshPlaneIntersect

get intersections between mesh and a plane
kendalldist

Calculates the Riemannian distance between two superimposed landmark configs.
meshcube

calculate the corners of a mesh's bouning box
prcompfast

fast Principal Component Analysis (PCA)
proc.weight

calculate weights inverse to the distances from the specified observation.
predict.CVA

Compute CV-scores from new data
predictShape.lm

Predict shapes based on linear models calculated from PCscores
predict.bgPCA

Compute between-group-PC scores from new data
placePatch

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

Procrustes ANOVA for structures with object symmetry
read.mpp

Read saved pick-points from meshlab
procSym

Procrustes registration
predictPLSfromData

predict 2 Block-PLS from new data
read.pts

reads pts files
file2mesh

Import 3D surface mesh files
points2plane

projects a 3D coordinate orthogonally onto a plane
quad2trimesh

converts a mesh containing quadrangular faces into one only consisting of triangles
read.slicerjson

read Landmarks from Slicer in Json format
readLandmarks.csv

import landmark data from csv files
ray2mesh

projects the vertices of a mesh along its normals onto the surface of another one.
read.csv.folder

batch import data from files
qqmat

Q-Q plot to assess normality of data
rotmesh.onto

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

rotate matrix of landmarks
projRead

Project points onto the closest point on a mesh
relWarps

calculate relative Warp analysis
relaxLM

relax one specific landmark configuration against a reference
restoreFromPCA

restore original data from PCA
readallTPS

Import landmarks and outlines from TPS files
regdist

correlation between shape space and tangent space
read.fcsv

read fiducials from slicer4
read.lmdta

read dta files
retroDeform3d

symmetrize a bilateral landmark configuration
retroDeformMesh

symmetrize a triangular mesh
r2morphoj

Export data to MorphoJ and Morphologika
resampleCurve

Resample a curve equidistantly
render

plot or save the results of meshDist
restoreShapes

restore shapes from PC-Scores or similar projections
typprob

calculate typicality probabilities
tps3d

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

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

sort curvepoints by using the subsequent neighbours
solutionSpace

returns the solution space (basis and translation vector) for an equation system
write.pts

exports a matrix containing landmarks into .pts format
scalemesh

scale a mesh of class "mesh3d"
rotonto

rotates, translates and scales one matrix onto an other using Procrustes fitting
write.fcsv

write fiducials in slicer4 format
write.slicerjson

Export landmarks (or any 3D coordinates) to the new slicer json format
warpmovie3d

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

slides Semilandmarks along curves and surfaces in 3D by minimising bending energy of a thin-plate spline deformation.
virtualMeshScan

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

convert an 3D array into a matrix and back
symmetrize

create a perfectly symmetric version of landmarks
rotaxisMat

calculate a rotation matrix around an arbitrary axis through the origin in 3D
unrefVertex

some little helpers for vertex operations on triangular meshes
rotaxis3d

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

calculate the orthogonal complement of a 3D-vector
updateNormals

Compute face or vertex normals of a triangular mesh
updateIndices

update a vector of indices after removal of some referenced items
NNshapeReg

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

convert data from LPS to RAS space and back
Morpho-package

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

Create Matrices necessary for Thin-Plate Spline
ProcGPA

Workhorse function for procSym, responsible for Procrustes registration
PCdist

correlation between a reduced space and the original space
RegScore

calulate regression scores for linear model
CAC

calculate common allometric component
CVA

Canonical Variate Analysis
areaSpherePart

compute the area of an n-dimensional hypersphere cap
deprecated

deprecated functions of Morpho
applyTransform

apply affine transformation to data
align2procSym

align new data to an existing Procrustes registration
angle.calc

calculate angle between two vectors
arrMean3

calculate mean of an array
areaSphere

compute the area of an n-dimensional hypersphere
angleTest

Test whether the direction of two vectors is similar