skelDirection: Skeleton angle and direction

View source: R/skelDirection.R

skelDirectionR Documentation

Skeleton angle and direction

Description

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.

Usage

skelDirection(skel, ax = 1)

Arguments

skel

topological skeleton, output of readAmiraSkeleton

Axis

the axis to use as reference for the calculation of the branch angle.

Details

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.

Value

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.

Author(s)

Alessio Veneziano

References

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.


AlessioVeneziano/indianaBones documentation built on Nov. 29, 2022, 12:21 a.m.