Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


rTwig (version 1.4.0)

tree_metrics: Tree Metrics

Description

Calculates tree metrics from a QSM

Usage

tree_metrics(cylinder, verify = TRUE)

Value

Returns a list of tree metric data frames and a synthetic point cloud

Arguments

cylinder

QSM cylinder data frame

verify

Verify QSM topology. Defaults to TRUE. If verify = TRUE, only topologically connected structures (e.g. a whole a tree or an individual branch) are eligible to run. This ensures all metrics are correct and verified. If verify = FALSE, the metrics are run, but not verified. This is strongly discouraged, but can enable the calculation of tree metrics on topologically disconnected structures.

Details

Calculates detailed tree, branch, and segment metrics from a QSM. Valid inputs require a connected QSM, which can be a whole tree or an individual branch. The outputs include all of the standard outputs from TreeQSM, and also additional variables, including, but not limited to, growth length, reverse branch order, branch segment or node relationships, and distances from twigs and the base of the tree, across various distribution metrics. Also included is a simulated point cloud of the tree, based on the QSM cylinder radii. When corrected with Real Twig, this allows for the testing and validation of point cloud diameter overestimation throughout the tree.

References

TreeQSMrTwig

growth_parameter1rTwig

growth_parameter2rTwig

treegraph2rTwig

path_fractionrTwig

Examples

Run this code

## TreeQSM Processing Chain
file <- system.file("extdata/QSM.mat", package = "rTwig")
cylinder <- import_treeqsm(file)$cylinder
cylinder <- update_cylinders(cylinder)
metrics <- tree_metrics(cylinder)
names(metrics)

## SimpleForest Processing Chain
file <- system.file("extdata/QSM.csv", package = "rTwig")
cylinder <- read.csv(file)
cylinder <- update_cylinders(cylinder)
metrics <- tree_metrics(cylinder)
names(metrics)

Run the code above in your browser using DataLab