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
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)
#> Updating Cylinder Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Caching Network
#> Verifying Topology
#> Calculating Growth Length
#> Calculating Reverse Branch Order
#> Calculating Branch Segments
#> Calculating Alternate Branch Numbers
#> Calculating Path Metrics
## Before Smoothing
plot_qsm(cylinder)
#> Plotting Cylinders
#> Panning plot on rgl device: 1
## After Smoothing
cylinder <- smooth_qsm(cylinder)
#> Smoothing QSM
plot_qsm(cylinder)
#> Plotting Cylinders
#> Panning plot on rgl device: 1