Learn R Programming

aRchi (version 2.1.3)

Truncate_QSM: Truncate a QSM

Description

Truncate a QSM at a radius threshold

Usage

Truncate_QSM(
  aRchi,
  threshold = NULL,
  Keepdaughters = FALSE,
  plotresult = FALSE
)

# S4 method for aRchi Truncate_QSM( aRchi, threshold = NULL, Keepdaughters = FALSE, plotresult = FALSE )

Value

An aRchi file with the QSM truncated

Arguments

aRchi

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

threshold

numeric. The radius threshold in meter.

Keepdaughters

logical (default = FALSE). Keep the daughters of the last segment retained even if they are lower than the threshold.

plotresult

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

Details

The threshold is applied to a whole segments. In other word, if a segment has at least one cylinder lower than the threshold it is removed as well as everything upstream (except the direct daughters if Keepdaughters=TRUE).

See Also

Clean_QSM to clean a QSM of an object aRchi.

Examples

Run this code
# \donttest{
# Read an aRchifile with a QSM and paths tables.
file=system.file("extdata","Tree_1_aRchi.aRchi",package = "aRchi")
Tree1_aRchi=read_aRchi(file)
# Truncate the QSM: 5cm radius threshold
Truncated_Tree1_aRchi=Truncate_QSM(Tree1_aRchi,plotresult = TRUE,threshold = 0.05)
# }

Run the code above in your browser using DataLab