Little R Script for Viusalising cylinders

Added by Hackenberg Jan about 3 years ago

One last anouncement before I am gone in vacations.

Matthias Kunz from the TU Dresden contributed a little R script to visualize cylinders within R. You can download it from the SimpleTree plugin download page. I know there is a few of you who modify the QSMs in R. Having the modifications visual in 3D on the screen is a powerful valdiation tool so try it out. I had today no time to test.

Here is also a fwe lines how to extract for example what I consider values with which you can build your own stem taper:

tree ← read.csv('mypath’,sep = “;”)
indices_stem ← which(tree$branch_order 0)
stem <- tree[indices,]
indices_spherefollowing <- which(stem$detection_Type SPHEREFOLLOWING)
stem_good ← stem[indices_spherefollowing,]
indices_non_interpolated ← which(stem_good$improvement_Type RANSAC)
stem_best <- stem[indices_non_interpolated,]
indices_non_interpolated_non_corrected <- which(stem_best$correction_Type NO_ALLOM)
stem_best_non_corrected ← stem[indices_non_interpolated_non_corrected ,]

All diameters/radii from stem_best_non_corrected will be robust fitted cylinders which have been improved with an Expectation Maximization step. Then passed a series of checks which I describe in my previous publications and have never been modified. Those can be considered true measurements. The other cylinders have been in some way corrected. You should be able to interpolate and extraplolate from those measurements with your own functions. And see the results in an R plot now.