Calculates tree metrics from a QSM
Details
Calculates detailed tree, branch, and segment metrics from a QSM. 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 allow for the testing and validation of point cloud diameter overestimation throughout the tree.
Examples
## TreeQSM Processing Chain
file <- system.file("extdata/QSM.mat", package = "rTwig")
cylinder <- import_qsm(file)$cylinder
#> Importing TreeQSM
cylinder <- update_cylinders(cylinder)
#> Updating Cylinder Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Caching Network
#> Verifying Topology
#> Calculating Growth Length
#> Calculating Reverse Branch Order
#> Calculating Branch Segments
#> Calculating Alternate Branch Numbers
#> Calculating Path Metrics
metrics <- tree_metrics(cylinder)
#> Calculating Branch Metrics
#> Calculating Segment Metrics
#> Calculating Tree Metrics
#> Generating Point Cloud
#> Calculating Crown Metrics
#> Calculating Tree Distributions
#> Calculating Branch Distributions
#> Calculating Segment Distributions
#> Calculating Stem Taper
#> Calculating Spreads
#> Calculating Alternate Branch Metrics
names(metrics)
#> [1] "branch" "segment" "cloud"
#> [4] "tree" "tree_height_dist" "tree_diameter_dist"
#> [7] "tree_zenith_dist" "tree_azimuth_dist" "branch_diameter_dist"
#> [10] "branch_height_dist" "branch_angle_dist" "branch_zenith_dist"
#> [13] "branch_azimuth_dist" "branch_order_dist" "segment_diameter_dist"
#> [16] "segment_height_dist" "segment_angle_dist" "segment_zenith_dist"
#> [19] "segment_azimuth_dist" "segment_order_dist" "stem_taper"
#> [22] "spreads" "vertical_profile" "branch_alt"
## SimpleForest Processing Chain
file <- system.file("extdata/QSM.csv", package = "rTwig")
cylinder <- read.csv(file)
cylinder <- update_cylinders(cylinder)
#> Finding Branches
#> Calculating Total Children
#> Building Cylinder Network
#> Caching Network
#> Verifying Topology
#> Calculating Path Metrics
metrics <- tree_metrics(cylinder)
#> Calculating Branch Metrics
#> Calculating Segment Metrics
#> Calculating Tree Metrics
#> Generating Point Cloud
#> Calculating Crown Metrics
#> Calculating Tree Distributions
#> Calculating Branch Distributions
#> Calculating Segment Distributions
#> Calculating Stem Taper
#> Calculating Spreads
#> Calculating Alternate Branch Metrics
names(metrics)
#> [1] "branch" "segment" "cloud"
#> [4] "tree" "tree_height_dist" "tree_diameter_dist"
#> [7] "tree_zenith_dist" "tree_azimuth_dist" "branch_diameter_dist"
#> [10] "branch_height_dist" "branch_angle_dist" "branch_zenith_dist"
#> [13] "branch_azimuth_dist" "branch_order_dist" "segment_diameter_dist"
#> [16] "segment_height_dist" "segment_angle_dist" "segment_zenith_dist"
#> [19] "segment_azimuth_dist" "segment_order_dist" "stem_taper"
#> [22] "spreads" "vertical_profile" "branch_alt"