Description Usage Arguments Value Examples
Compute RMSE between three different techniques to compare processing methods
1 2 | RMSE_computation(path_somas_algorithm, path_somas_expert_1, path_somas_expert_2,
parallel = TRUE)
|
technique_1 |
path to the folder where meshes processed with the first technique are placed. They have to be PLY files |
technique_2 |
path to the folder where meshes processed with the second technique are placed. They have to be PLY files |
technique_3 |
path to the folder where meshes processed with the third technique are placed. They have to be PLY files |
RMSE a matrix Nx3 where N is the number of meshes and first column is RMSE between technique 1 and technique 2, second column is RMSE between technique 1 and technique 3 and third column is RMSE between technique 2 and technique 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | ######################################################
###################### Interexpert ###################
######################################################
#RMSE between the somas of the algorithm and the somas of the experts before repairing the experts' somas
path_somas_algorithm<- "./temp/final_result"
path_somas_experts<- system.file("test/pre_repaired",package="SomaMS")
experts_paths<-list.dirs(path_somas_experts,recursive=F)
pre_repaired_RMSE<-RMSE_mesh_distance(path_somas_algorithm, experts_paths[1], experts_paths[2], TRUE)
#RMSE between the somas of the algorithm and the somas of the experts after repairing the experts' somas
path_somas_algorithm<- "./temp/final_result"
path_somas_experts<- system.file("test/post_repaired",package="SomaMS")
experts_paths<-list.dirs(path_somas_experts,recursive=F)
post_repaired_RMSE<-RMSE_mesh_distance(path_somas_algorithm, experts_paths[1], experts_paths[2], TRUE)
X11(width = 18, height = 10.37)
par(mfrow=c(1,2))
values_barplot <- t(pre_repaired_RMSE)
colors <- c(rainbow(3))
mp <- barplot2(values_barplot, main = "RMSE before repairing experts' somas", ylab = "RMSE", beside = TRUE,
col = colors, ylim = c(0, 1.7), cex.names = 1.5, cex.lab = 1.5, cex.axis = 1.5)
legend("top", legend = c("Procedure Vs Expert 1", "Procedure Vs Expert 2", "Expert 1 Vs Expert 2"), fill = colors, box.col = "transparent", x.intersp = 0.8, cex = 1.5)
mtext(1, at = mp[2,], text = c("Neuron 1", "Neuron 2", "Neuron 3", "Neuron 4", "Neuron 5", "Neuron 6", "Neuron 7", "Neuron 8", "Neuron 9"), line = 0.5, cex = 1)
legend("topleft", legend = "", title = "A", box.col = "transparent", cex = 2)
values_barplot <- t(post_repaired_RMSE)
colors <- c(rainbow(3))
mp <- barplot2(values_barplot, main = "RMSE after repairing experts' somas", ylab = "RMSE", beside = TRUE,
col = colors, ylim = c(0, 1.7), cex.names = 1.5, cex.lab = 1.5, cex.axis = 1.5)
legend("top", legend = c("Procedure Vs Expert 1", "Procedure Vs Expert 2", "Expert 1 Vs Expert 2"), fill = colors, box.col = "transparent", x.intersp = 0.8, cex = 1.5)
mtext(1, at = mp[2,], text = c("Neuron 1", "Neuron 2", "Neuron 3", "Neuron 4", "Neuron 5", "Neuron 6", "Neuron 7", "Neuron 8", "Neuron 9"), line = 0.5, cex = 1)
legend("topleft", legend = "", title = "B", box.col = "transparent", cex = 2)
print(paste0("Mean interexpert RMSE: ", mean(post_repaired_RMSE[,3])))
######################################################
###################### Intraexpert ###################
######################################################
path_somas_experts<- system.file("test/intraexpert",package="SomaMS")
experts_paths<-list.dirs(path_somas_experts,recursive=F)
expert_1_days<-list.dirs(experts_paths[1],recursive=F)
expert_2_days<-list.dirs(experts_paths[2],recursive=F)
intraexpert_expert_1 <- RMSE_mesh_distance(expert_1_days[1], expert_1_days[2], expert_1_days[3], TRUE)
intraexpert_expert_2 <- RMSE_mesh_distance(expert_2_days[1], expert_2_days[2], expert_2_days[3], TRUE)
X11(width = 18, height = 10.37)
par(mfrow = c(1,2))
valuesBarplot <- t(intraexpert_expert_1)
colors <- c(rainbow(3))
mp <- barplot2(valuesBarplot, main="Intra-expert variability of the first expert ", ylab = "RMSE", beside = TRUE,
col = colors, ylim = c(0,1.6), cex.names = 1.5,cex.lab = 1.5, cex.axis = 1.5)
legend("top",legend = c("Day 1 Vs Day 2","Day 1 Vs Day 3","Day 2 Vs Day 3"), fill = colors, box.col = "transparent", x.intersp = 0.8, cex = 1.5)
mtext(1, at = mp[2,], text = c("Neuron 1","Neuron 2","Neuron 3","Neuron 4","Neuron 5","Neuron 6"),line = 0.5, cex = 1.3)
legend("topleft",legend="",title="A",box.col = "transparent",cex=2)
values_barplot<-t(intraexpert_expert_2)
colors<-c(rainbow(3))
mp <- barplot2(values_barplot, main = "Intra-expert variability of the second expert ", ylab = "RMSE", beside = TRUE,
col = colors, ylim = c(0, 1.6), cex.names = 1.5, cex.lab = 1.5, cex.axis = 1.5)
legend("top",legend = c("Day 1 Vs Day 2","Day 1 Vs Day 3","Day 2 Vs Day 3"), fill = colors, box.col = "transparent", x.intersp = 0.8, cex = 1.5)
mtext(1, at = mp[2,], text = c("Neuron 1", "Neuron 2", "Neuron 3", "Neuron 4", "Neuron 5", "Neuron 6"), line = 0.5, cex = 1.3)
legend("topleft", legend = "", title = "B", box.col = "transparent", cex = 2)
print(paste0("Mean RMSE for the first expert: ", mean(c(intraexpert_expert_1))))
print(paste0("Mean RMSE for the second expert: ", mean(c(intraexpert_expert_2))))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.