qsm_topology: Compute topology from a qsm file

View source: R/qsm_topology.R

qsm_topologyR Documentation

Compute topology from a qsm file

Description

Compute topology from a qsm file

Usage

qsm_topology(QSM_file)

Arguments

QSM_file

a qsm file

Value

the qsm file now includin axid_ID, axis sections and branching order

Examples


# import the obj file output from adTree
file = system.file("extdata", "adtree_qsm.obj", package="lidUrb")
mesh = Morpho::obj2mesh(file)

# transform the adTree mesh into a qsm file, simplify the mesh and compute
# some woody structure features
qsm = lidUrb::adtree2qsm(mesh)

# compute qsm topology
qsm$qsm = lidUrb::qsm_topology(qsm$qsm)

rgl::open3d()
rgl::shade3d(qsm$mesh,col=rep(qsm$qsm$branching_order,each=20),meshColor = "faces",add=T)

rgl::open3d()
rgl::shade3d(qsm$mesh,col=rep(qsm$qsm$axis_ID,each=20),meshColor = "faces",add=T)


Blecigne/lidUrb documentation built on Feb. 19, 2024, 9:12 a.m.