## Load Data
file <- system.file("extdata/QSM.mat", package = "rTwig")
file2 <- system.file("extdata/cloud.txt", package = "rTwig")
qsm <- run_rtwig(file, twig_radius = 4.23, metrics = FALSE)
cloud <- read.table(file2)
## Clustered Cloud
clustered_cloud <- cluster_cloud(cylinder = qsm, cloud = cloud)
# # Join QSM variables and export
# filename <- tempfile(pattern = "clustered_cloud", fileext = ".txt")
# clustered_cloud %>%
# left_join(qsm) %>%
# fwrite(file = filename)
## Simulated Cloud
simulated_cloud <- cluster_cloud(cylinder = qsm, spacing = 0.01)
# Plot Simulated Cloud
plot_qsm(cloud = simulated_cloud)
# # Join QSM variables and export
# filename2 <- tempfile(pattern = "simulated_cloud", fileext = ".txt")
# simulated_cloud %>%
# left_join(qsm) %>%
# fwrite(file = filename2)
Run the code above in your browser using DataLab