Table of Contents
The GroIMP QSM-plugin aims at consistent transferability with rTwig and its supported QSM dialect. RTwig supports a range of different qsm formats as input, including: TreeQSM, SipmleForest, Treegraph, aRchi and AdQSM.
The input considered by this plugin, is the output of the
standardise_qsm function of rTwig written as
a csv with the file extension .qsm.
For example using a treeqsm file:
# install.packages("rTwig")
library(rTwig)
# load example matlab file from the rTwig library
file <- system.file("extdata/QSM.mat", package = "rTwig")
# import for treeqsm
qsm <-import_treeqsm(file)
# recalculate cylinder position in R twig
qsm$cylinder <- update_cylinders(qsm$cylinder)
# standardise column names
qsm$cylinder <-standardise_qsm(qsm$cylinder)
# save as a csv file with the ending qsm
write.csv(qsm$cylinder, "/home/tim/toto.qsm")
# plot for compareison
plot_qsm(qsm$cylinder)