From c0c0ea3928e0d5ca02ce7ee3d4c836cca6aa7ca4 Mon Sep 17 00:00:00 2001 From: pranathivemuri Date: Wed, 27 Apr 2016 17:48:31 -0500 Subject: [PATCH] writes 7 features to csv file 1st row - feature name, 2nd row-Gt Features, 3rd row- T features --- main.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index 1e8293a..7c7526d 100644 --- a/main.cpp +++ b/main.cpp @@ -8,6 +8,7 @@ //STIM includes #include +#include #include #include #include @@ -207,6 +208,46 @@ void compare(float sigma){ std::cout << "FPR: " << FNR << std::endl; } +// writes features of the networks i.e average segment length, tortuosity, branching index, contraction, fractal dimension, number of end and branch points to a csv file +void features(){ + double avgL_t, avgL_gt, avgT_t, avgT_gt, avgB_t, avgB_gt, avgC_t, avgC_gt, avgFD_t, avgFD_gt; + unsigned int e_t, e_gt, b_gt, b_t; + avgL_gt = GT.Lengths(); + avgT_gt = GT.Tortuosities(); + //std::cout<= 1){ //if at least one network file is specified num_nets = 1; //set the number of networks to one GT.load_obj(args.arg(0)); //load the specified file as the ground truth + /*GT.to_txt("Graph.txt");*/ } if(args.nargs() == 2){ //if two files are specified, they will be displayed in neighboring viewports and compared num_nets = 2; //set the number of networks to two float sigma = args["sigma"].as_float(); //get the sigma value from the user - T.load_obj(args.arg(1)); //load the second (test) network - double avgL, avgT; - avgL = GT.Lengths(); - avgT = GT.Tortuosities(); - std::cout<