smooth_qsm {rTwig}R Documentation

Smooth QSM

Description

Visually smooth a QSM by ensuring the midpoints of all cylinders are connected. Only TreeQSM is supported.

Usage

smooth_qsm(cylinder)

Arguments

cylinder

QSM cylinder data frame

Value

Returns a data frame

Examples


file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_treeqsm(file)
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)

## Before Smoothing
plot_qsm(cylinder)

## After Smoothing
cylinder <- smooth_qsm(cylinder)
plot_qsm(cylinder)


[Package rTwig version 1.4.0 Index]