Visual smoothing of a QSM by ensuring the midpoints of all cylinders are connected
Examples
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_qsm(file)
#> Importing TreeQSM .mat
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)
#> Updating Cylinder Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Verifying Topology
#> Calculating Growth Length
#> Calculating Reverse Branch Order
#> Calculating Branch Segments
#> Calculating Alternate Branch Numbers
#> Calculating Distance From Base
#> Calculating Average Distance To Twigs
## Before Smoothing
plot_qsm(cylinder)
#> Plotting QSM
#> Plotting Cylinders
## After Smoothing
cylinder <- smooth_qsm(cylinder)
#> Smoothing QSM
plot_qsm(cylinder)
#> Plotting QSM
#> Plotting Cylinders