Clean_QSM: Cleans a QSM

Clean_QSMR Documentation

Cleans a QSM

Description

Cleans the QSM in an object of class aRchi by removing branches that have a disproportionate lower radius than their siblings.

Usage

Clean_QSM(aRchi, threshold = NULL, plotresult = FALSE)

## S4 method for signature 'aRchi'
Clean_QSM(aRchi, threshold = NULL, plotresult = FALSE)

Arguments

aRchi

an object of class aRchi with at least a QSM and a Paths table.

threshold

numeric. The proportion of the largest daughter diameter (between 0 and 1) under which a branch is removed.

plotresult

logical (default = FALSE). Show the results in a 3d plot if TRUE

Details

This cleaning is done by browsing the tree QSM from the base to the top. Each time a ramification point is encountered a daughter branch is removed if its radius is lower than a selected (i.e threshold) proportion of radius of the largest daughter. This allows removing small branches on large branches that can be for example traumatic or epicormic shoots or false branches due to noise in QSM. In ForkRate function the same approach is used with a threshold of 75% (i.e 0.75) to count the number of fork and compute the fork rate.

Value

An object of class aRchi with the cleaned QSM.

See Also

ForkRate to compute the fork rate; Truncate_QSM to truncate a QSM at a specific diameter threshold

Examples


# Read an aRchi file with a QSM and paths tables.
file=system.file("extdata","Tree_1_aRchi.aRchi",package = "aRchi")
Tree1_aRchi=read_aRchi(file)
# Clean the QSM: threshold of 0.5
Cleaned_Tree1_aRchi=Clean_QSM(Tree1_aRchi,threshold = 0.5,plotresult = TRUE)
# show the cleaned QSM data.table
get_QSM(Cleaned_Tree1_aRchi)


aRchi documentation built on Sept. 3, 2022, 9:06 a.m.