Learn R Programming

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

Morpho (version 2.10)

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

Version

2.10

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Stefan Schlager

Last Published

September 9th, 2022

Functions in Morpho (2.10)

CreateL

Create Matrices necessary for Thin-Plate Spline
CAC

calculate common allometric component
NNshapeReg

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

Workhorse function for procSym, responsible for Procrustes registration
RegScore

calulate regression scores for linear model
deprecated

deprecated functions of Morpho
Morpho-package

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

Test whether the direction of two vectors is similar
applyTransform

apply affine transformation to data
CVA

Canonical Variate Analysis
LPS2RAS

convert data from LPS to RAS space and back
anonymize

Replace ID-strings of data and associated files.
cExtract

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

calculate Centroid Size for a landmark configuration
bindArr

concatenate multiple arrays/matrices
arrMean3

calculate mean of an array
boneData

Landmarks and a triangular mesh
align2procSym

align new data to an existing Procrustes registration
array2list

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

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

correlation between a reduced space and the original space
areaSphere

compute the area of an n-dimensional hypersphere
closemeshKD

Project coordinates onto a target triangular surface mesh.
angle.calc

calculate angle between two vectors
areaSpherePart

compute the area of an n-dimensional hypersphere cap
armaGinv

calculate Pseudo-inverse of a Matrix using RcppArmadillo
equidistantCurve

make a curve equidistant (optionally up/downsampling)
colors

predefined colors for bone and skin
checkLM

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

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

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

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

calculates the barycenters for all faces of a triangular mesh
computeTransform

calculate an affine transformation matrix
cutMeshPlane

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

calculate the pooled within groups covariance matrix
computeArea

Compute area enclosed within an irregular polygon
cutSpace

separate a 3D-pointcloud by a hyperplane
createAtlas

Create an atlas needed in placePatch
exVar

calculate variance of a distribution stemming from prediction models
getPointAlongOutline

Get a point along a line with a given distance from the start of the line
fixLMmirror

estimate missing landmarks from their bilateral counterparts
getSides

try to identify bilateral landmarks and sort them by side
fixLMtps

estimate missing landmarks
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
getFaces

find indices of faces that contain specified vertices
covDist

calculates distances and PC-coordinates of covariance matrices
getMeaningfulPCs

get number of meaningful Principal components
data2platonic

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

compute changes associated with 2-Block PLS-scores
getTrafo4x4

get 4x4 Transformation matrix
fastKmeans

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

compute 2-Block PLS scores for new data
histGroup

plot histogram for multiple groups.
getTrafoRotaxis

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

visualise differences between two superimposed sets of 2D landmarks
find.outliers

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

Get viewpoints on a sphere around a 3D mesh
icpmat

match two landmark configurations using iteratively closest point search
meshPlaneIntersect

get intersections between mesh and a plane
getPCscores

Obtain PC-scores for new landmark data
getVisibleVertices

find vertices visible from a given viewpoints
invertFaces

invert faces' orientation of triangular mesh
list2array

converts a list of matrices to an array
meshcube

calculate the corners of a mesh's bouning box
mcNNindex

find nearest neighbours for 2D and 3D point clouds
line2plane

get intersection between a line and a plane
mirror2plane

mirror points or mesh on an arbitrary plane
plot.slider3d

plot the result of slider3d
plotAtlas

visualize an atlas defined by createAtlas
name2factor

extract data from array names
lineplot

plot lines between landmarks
file2mesh

Import 3D surface mesh files
kendalldist

Calculates the Riemannian distance between two superimposed landmark configs.
meshres

calculate average edge length of a triangular mesh
groupPCA

Perform PCA based of the group means' covariance matrix
points2plane

projects a 3D coordinate orthogonally onto a plane
retroDeform3d

symmetrize a bilateral landmark configuration
deformGrid3d

visualise differences between two superimposed sets of 3D landmarks
predictPLSfromScores

predict data from 2-Block PLS-scores
mergeMeshes

merge multiple triangular meshes into a single one
retroDeformMesh

symmetrize a triangular mesh
predictRelWarps

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

convert a colored mesh to greyscale.
write.fcsv

write fiducials in slicer4 format
predictShape.lm

Predict shapes based on linear models calculated from PCscores
proc.weight

calculate weights inverse to the distances from the specified observation.
plotNormals

plots the normals of a triangular surface mesh.
pcaplot3d

visualization of shape variation
permudist

performs permutation testing for group differences.
mirror

mirror landmarks or triangular mesh in place
prcompfast

fast Principal Component Analysis (PCA)
read.slicerjson

read Landmarks from Slicer in Json format
nose

landmarks and a triangular mesh representing a human nose
mesh2obj

export mesh objects to disk
predict.CVA

Compute CV-scores from new data
pls2B

Two-Block partial least square regression.
meshDist

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

Get the shape changes from pls2B associated with each latent variable
readLandmarks.csv

import landmark data from csv files
write.pts

exports a matrix containing landmarks into .pts format
plsCoVarCommonShape

Compute the shape changes along the common axis of deformations
ray2mesh

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

Project points onto the closest point on a mesh
tps3d

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

Q-Q plot to assess normality of data
pcAlign

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

calculate typicality probabilities
vecx

convert an 3D array into a matrix and back
unrefVertex

some little helpers for vertex operations on triangular meshes
read.fcsv

read fiducials from slicer4
permuvec

perfom permutation testing on angles and distances between subgroups of two major groups.
read.lmdta

read dta files
predict.bgPCA

Compute between-group-PC scores from new data
predictPLSfromData

predict 2 Block-PLS from new data
quad2trimesh

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

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

Procrustes ANOVA for structures with object symmetry
read.csv.folder

batch import data from files
render

plot or save the results of meshDist
resampleCurve

Resample a curve equidistantly
procSym

Procrustes registration
symmetrize

create a perfectly symmetric version of landmarks
read.mpp

Read saved pick-points from meshlab
relWarps

calculate relative Warp analysis
crossProduct

calculate the orthogonal complement of a 3D-vector
read.pts

reads pts files
relaxLM

relax one specific landmark configuration against a reference
write.slicerjson

Export landmarks (or any 3D coordinates) to the new slicer json format
rotmesh.onto

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

restore original data from PCA
restoreShapes

restore shapes from PC-Scores or similar projections
rotonto

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

rotate matrix of landmarks
scalemesh

scale a mesh of class "mesh3d"
solutionSpace

returns the solution space (basis and translation vector) for an equation system
virtualMeshScan

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

Export data to MorphoJ and Morphologika
readallTPS

Import landmarks and outlines from TPS files
regdist

correlation between shape space and tangent space
rotaxis3d

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

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

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

sort curvepoints by using the subsequent neighbours
updateNormals

Compute face or vertex normals of a triangular mesh