Learn R Programming

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

Morpho (version 2.11)

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

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Stefan Schlager

Last Published

January 27th, 2023

Functions in Morpho (2.11)

CVA

Canonical Variate Analysis
CreateL

Create Matrices necessary for Thin-Plate Spline
NNshapeReg

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

calculate common allometric component
ProcGPA

Workhorse function for procSym, responsible for Procrustes registration
LPS2RAS

convert data from LPS to RAS space and back
deprecated

deprecated functions of Morpho
RegScore

calulate regression scores for linear model
align2procSym

align new data to an existing Procrustes registration
angle.calc

calculate angle between two vectors
areaSpherePart

compute the area of an n-dimensional hypersphere cap
Morpho-package

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

calculate mean of an array
array2list

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

concatenate multiple arrays/matrices
checkNA

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

calculate Centroid Size for a landmark configuration
cExtract

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

compute the area of an n-dimensional hypersphere
applyTransform

apply affine transformation to data
asymPermute

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

calculate Pseudo-inverse of a Matrix using RcppArmadillo
checkLM

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

Test whether the direction of two vectors is similar
anonymize

Replace ID-strings of data and associated files.
boneData

Landmarks and a triangular mesh
classify

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

calculate an affine transformation matrix
PCdist

correlation between a reduced space and the original space
cutSpace

separate a 3D-pointcloud by a hyperplane
createMissingList

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

calculates the barycenters for all faces of a triangular mesh
covDist

calculates distances and PC-coordinates of covariance matrices
find.outliers

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

calculate the pooled within groups covariance matrix
getPLSfromScores

compute changes associated with 2-Block PLS-scores
createAtlas

Create an atlas needed in placePatch
getPLSscores

compute 2-Block PLS scores for new data
fastKmeans

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

get 4x4 Transformation matrix
exVar

calculate variance of a distribution stemming from prediction models
equidistantCurve

make a curve equidistant (optionally up/downsampling)
data2platonic

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

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

predefined colors for bone and skin
cutMeshPlane

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

Get viewpoints on a sphere around a 3D mesh
fixLMmirror

estimate missing landmarks from their bilateral counterparts
fixLMtps

estimate missing landmarks
getPCscores

Obtain PC-scores for new landmark data
kendalldist

Calculates the Riemannian distance between two superimposed landmark configs.
getPLSCommonShape

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

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

invert faces' orientation of triangular mesh
closemeshKD

Project coordinates onto a target triangular surface mesh.
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
deformGrid2d

visualise differences between two superimposed sets of 2D landmarks
meshPlaneIntersect

get intersections between mesh and a plane
deformGrid3d

visualise differences between two superimposed sets of 3D landmarks
list2array

converts a list of matrices to an array
meshcube

calculate the corners of a mesh's bouning box
line2plane

get intersection between a line and a plane
groupPCA

Perform PCA based of the group means' covariance matrix
getVisibleVertices

find vertices visible from a given viewpoints
permudist

performs permutation testing for group differences.
pcaplot3d

visualization of shape variation
mirror2plane

mirror points or mesh on an arbitrary plane
mcNNindex

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

extract data from array names
mesh2grey

convert a colored mesh to greyscale.
permuvec

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

merge multiple triangular meshes into a single one
placePatch

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

predict data from 2-Block PLS-scores
predict.bgPCA

Compute between-group-PC scores from new data
predictRelWarps

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

plot lines between landmarks
meshDist

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

Compute area enclosed within an irregular polygon
getFaces

find indices of faces that contain specified vertices
plsCoVar

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

Two-Block partial least square regression.
mesh2obj

export mesh objects to disk
plotNormals

plots the normals of a triangular surface mesh.
plsCoVarCommonShape

Compute the shape changes along the common axis of deformations
nose

landmarks and a triangular mesh representing a human nose
predictPLSfromData

predict 2 Block-PLS from new data
quad2trimesh

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

Procrustes registration
r2morphoj

Export data to MorphoJ and Morphologika
procAOVsym

Procrustes ANOVA for structures with object symmetry
pcAlign

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

calculate relative Warp analysis
readallTPS

Import landmarks and outlines from TPS files
read.slicerjson

read Landmarks from Slicer in Json format
read.lmdta

read dta files
read.fcsv

read fiducials from slicer4
qqmat

Q-Q plot to assess normality of data
projRead

Project points onto the closest point on a mesh
icpmat

match two landmark configurations using iteratively closest point search
meshres

calculate average edge length of a triangular mesh
histGroup

plot histogram for multiple groups.
getMeaningfulPCs

get number of meaningful Principal components
mirror

mirror landmarks or triangular mesh in place
restoreShapes

restore shapes from PC-Scores or similar projections
regdist

correlation between shape space and tangent space
restoreFromPCA

restore original data from PCA
plotAtlas

visualize an atlas defined by createAtlas
plot.slider3d

plot the result of slider3d
prcompfast

fast Principal Component Analysis (PCA)
file2mesh

Import 3D surface mesh files
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
relaxLM

relax one specific landmark configuration against a reference
read.csv.folder

batch import data from files
slider2d

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

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

projects a 3D coordinate orthogonally onto a plane
write.fcsv

write fiducials in slicer4 format
slider3d

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

import landmark data from csv files
symmetrize

create a perfectly symmetric version of landmarks
predict.CVA

Compute CV-scores from new data
warpmovie3d

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

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

calculate the orthogonal complement of a 3D-vector
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
rotonmat

rotate matrix of landmarks
updateNormals

Compute face or vertex normals of a triangular mesh
sortCurve

sort curvepoints by using the subsequent neighbours
rotmesh.onto

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

Resample a curve equidistantly
solutionSpace

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

plot or save the results of meshDist
unrefVertex

some little helpers for vertex operations on triangular meshes
predictShape.lm

Predict shapes based on linear models calculated from PCscores
vecx

convert an 3D array into a matrix and back
retroDeform3d

symmetrize a bilateral landmark configuration
updateIndices

update a vector of indices after removal of some referenced items
proc.weight

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

symmetrize a triangular mesh
read.mpp

Read saved pick-points from meshlab
read.pts

reads pts files
tps3d

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

calculate typicality probabilities
write.slicerjson

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