Skip to contents

Morphometric methods

Outlines

eft()
Elliptic Fourier Transform
eft_i()
Inverse elliptic Fourier transform
eft_name()
Name elliptic Fourier coefficients
eft_norm()
Normalize elliptic Fourier coefficients
eft_split()
Split EFT coefficient vector into components

Curves

opoly()
Orthogonal Polynomial Transform
opoly_i()
Inverse orthogonal polynomial transform
opoly_name()
Name orthogonal polynomial coefficients
npoly()
Natural Polynomial Transform
npoly_i()
Inverse natural polynomial transform
npoly_name()
Name natural polynomial coefficients
dct()
Discrete Cosine Transform
dct_i()
Inverse discrete cosine transform
dct_name()
Name discrete cosine transform coefficients
dct_split()
Split DCT coefficient vector into components

Classes and printers

Mostly cosmetics

Dispatcher and function factories

Exposed extending helpers

make_coo_function()
Create a coo function with automatic dispatch
make_get_function()
Create a get function with automatic dispatch
get_coo_cols() get_all_coo_cols()
Identify coo columns in a tibble
get_coe_cols() get_all_coe_cols()
Identify coe columns in a tibble

Verbs

ease common operations

fold()
Fold multiple columns into a single list-column
unfold()
Unfold a list-column into multiple columns or a matrix
wrap()
Wrap coordinates from rows to list-column of matrices
unwrap()
Unwrap coordinates from list-column of matrices to rows
front()
Relocate morphometric columns to front
declass()
Remove Momocs classes

Dataset

To play with

bot
Bottles dataset
hearts
Heart dataset
olea
Olea dataset
wings
Wings dataset
shapes
Shapes dataset

coo_* coordinate transformations

Functions that take coo and return coo

Basic transformations

coo_center()
Center coordinates
coo_translate()
Translate coordinates
coo_scale()
Scale to unit centroid size

Rotation

coo_rotate()
Rotate coordinates
coo_rotate_around()
Rotate around a center point
coo_untilt_x() coo_untilt_y()
Untilt to axis

Alignment

Align shapes using internal information

coo_align()
Align shape to principal axes
coo_align_minor()
Align shape to minor and major axes (swapped)
coo_align_calliper() coo_align_minradius()
Align to special features

Baseline registration

Align shapes using landmarks

coo_baseline() coo_bookstein()
Baseline correction (Bookstein registration)

Sampling and smoothing

Sample up and down coordinates number

coo_sample() coo_sample_prop()
Sample coordinates
coo_sample_regular_radius()
Sample at regular angles from centroid
coo_smooth() coo_smooth_fixed()
Smooth coordinates

Slide

Change row ordering

Direction

Control trigonometric or clockwise direction

coo_reverse()
Reverse point order
coo_direction_positive() coo_direction_negative()
Ensure positive (counter-clockwise) direction

Open/close shapes

coo_close() coo_open()
Close or open outlines
coo_close_spread()
Close outline by spreading gap

Template shapes

Standardize on bounding boxes

coo_template() coo_template_relatively()
Template shapes to standard size

Flipping

Reflect shapes

Filtering

Extract coordinates based on spatial criteria

coo_extract() coo_head() coo_tail()
Extract or subset coordinates
coo_trim_head() coo_trim_tail() coo_trim_both()
Trim points from outline ends
coo_up() coo_down() coo_right() coo_left()
Filter points by direction from centroid

Translate variants

coo_translate_jitter()
Jitter coordinates
coo_translate_to_xaxis()
Translate shape to x-axis
coo_translate_to_yaxis()
Translate shape to y-axis

Cut and join

Cut single shapes into several and back

get_cut()
Cut outline at landmarks
get_join()
Join curves into closed outline

Misc operations

Where to put them? Why not here?

coo_check()
Check and clean coordinates
coo_shear_x() coo_shear_y()
Shear coordinates

get_* shape descriptors

Functions that take coo and return scalar descriptors

Measurement helper

Compute and add multiple measurements

measure()
Measure shape properties
available_measures()
List available measurements

Basic size measures

get_area()
Get area of a closed outline
get_perim() get_perim_along() get_perim_cum()
Get perimeter measurements

Other size measures

Overall size and dimensions

get_length()
Get length
get_width()
Get width
get_calliper() get_calliper_ids()
Get calliper
get_centroid_size() centsize()
Get centroid size
get_centroid_size_norm() centsize_norm()
Get normalized centroid size

Circularity and aspect

Shape complexity

get_convexity()
Get convexity
get_solidity()
Get solidity
get_rugosity()
Get rugosity
get_compactness()
Get compactness
get_rectangularity()
Get rectangularity
get_rectilinearity()
Get rectilinearity

get_* other operations

Functions that take coo and return other than coo and scalars

Landmarks

ldk_id coordinates extraction

get_ldk()
Extract landmark coordinates

Transformations

Extract and apply geometric transformations

get_transform()
Extract transformation between two configurations
get_transformed()
Apply transformation to coordinates
get_centroid()
Get centroid of a shape
get_centroid_distance()
Get distances from centroid

Distances and angles

Distances and angular measures

get_centroid_distance()
Get distances from centroid
get_perim() get_perim_along() get_perim_cum()
Get perimeter measurements
get_lw()
Get length and width
get_calliper() get_calliper_ids()
Get calliper
get_truss()
Get truss (all pairwise distances)

Angles

get_angles()
Get angles from centroid
get_angle_edges()
Get angles at vertices
get_angle_tangent()
Get tangent angles

Extents and boundaries

get_range()
Get coordinate ranges
get_range_diff()
Get range span
get_bbox()
Get bounding box corners
get_coords_nb()
Get number of coordinates

Direction and position

Orientation and point location

get_direction_sign()
Get outline direction sign
get_closest() get_closest_angle()
Find closest point to target
get_closest_direction()
Get point closest to a given direction

Convex hull

Convex hull extraction and analysis

get_chull() get_chull_id()
Get convex hull
get_chull_onion()
Get convex hull layers (onion peeling)

Visualization

Plotting and display functions

pile()
Plot shapes stacked together
mosaic()
Plot shapes in grid mosaic layout
p() draw_landmarks() draw_landmarks_as_numbers() draw_outlines() draw_centroid() draw_first_point() draw_links()
Minimal plotting system for morphometric shapes

Reimport

From other packages

pipes %>% %T>% %$%
Pipe operators