smooth_skeleton | R Documentation |
Smooth a tree skeleton
smooth_skeleton(aRchi, niter = 1, th = 0) ## S4 method for signature 'aRchi' smooth_skeleton(aRchi, niter = 1, th = 0)
aRchi |
a file of class aRchi containing at least a skeleton. |
niter |
integer. Number of iterations to perform. |
th |
numeric. The distance threshold to correct the segments tips position. |
Smooth a skeleton or a QSM by computing the distance of a node to the segment
formed by its parent and child nodes of the same axis. If the distance is
greater than th
, the node coordinates are moved on the segment.
This process is done niter
times.
a file of class aRchi with a smoothed skeleton
# import aRchi file aRchi=system.file("extdata","Tree_2.aRchi",package = "aRchi") aRchi = aRchi::read_aRchi(aRchi) # plot original skeleton plot(aRchi) # smooth skeleton aRchi = aRchi::smooth_skeleton(aRchi) # plot smoothed skeleton plot(aRchi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.