skelDensity: Skeleton density

View source: R/skelDensity.R

skelDensityR Documentation

Skeleton density

Description

Calculates 3D density of nodes and branches of the topological skeleton based on a Kernel density estimate, using the kde3d function in the package 'misc3d'. Density is calculated as point per cube centimeter.

Usage

skelDensity(skel, method = c("node", "edge"), Scale = T, nxyz = c(50, 50, 50))

Arguments

skel

topological skeleton, output of readAmiraSkeleton

method

defines if the density is calculated based on the skeleton nodes ('node') or branches ('edge')

Scale

logical: if TRUE, the noes and branch coordinates are scaled on their overall variance

nxyz

a vector of length 3 indicating the dimensions of the 3D grid for the estimation of the kernel density (default = 50x50x50)

Value

Density

a vector of densities estimated at each node (if method = 'node'; unit: node per cube cm) or branch point (if method = 'edge'; unit: branch point per cube cm).

map

an array of dimension nxyz with the estimated kernel density.

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.

Venables, WN and Ripley, BD. 2002. Modern Applied Statistics with S. Fourth edition. Springer.

Examples

#Calculate and visualize skeleton node density
data(exampleSkeleton)
dens<-skelDensity(exampleSkeleton,method="node")
  image(dens$map[,,25])


AlessioVeneziano/IndianaBones documentation built on Dec. 2, 2022, 7:35 a.m.