View source: R/skelDirection.R
skelDirection | R Documentation |
Calculates the direction of the branches of the topological skeleton. The vector sum of all directions is used to calculate an overall angle of the skeleton branches with respect to a reference axis.
skelDirection(skel, ax = 1)
skel |
topological skeleton, output of |
Axis |
the axis to use as reference for the calculation of the branch angle. |
The 3D angle is calculated in radians between a reference axis and the unitary resultant of all branch directions
obtained by vector sum in 3D. Axis
can be provided by the user as a matrix with starting and ending coordinates of
the axis. Alternatively, if Axis
is set to 1, 2 or 3, the reference axis is calculated as the principal component
axes of the skeleton node coordinates using getAxis
.
angles |
a vector of branch angles, of length equal to the number of branches. |
directions |
a matrix of branch vector directions. |
refAxis |
a matrix of the coordinates of the reference axis. |
resDir |
a vector of the main branch direction resulting from vector sum. |
resAng |
the main branch angle calculated in radians. |
Alessio Veneziano
Veneziano A, Cazenave M, Alfieri F, Panetta D, Marchi D. 2021. Novel strategies for the characterization of cancellous bone morphology: Virtual isolation and analysis. American Journal of Physical Anthropology.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.