From 9585037886221f7517fd4277bce0af6187201428 Mon Sep 17 00:00:00 2001 From: Jiaming Guo Date: Tue, 17 Jan 2017 16:04:04 -0600 Subject: [PATCH] add two good testing files --- CMakeLists.txt | 2 ++ main.cu | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c959f24..3a93f08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,3 +85,5 @@ configure_file(data/04_Tb.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Tb.obj @ONLY) configure_file(data/1.swc ${CMAKE_CURRENT_BINARY_DIR}/1.swc @ONLY) configure_file(data/2.swc ${CMAKE_CURRENT_BINARY_DIR}/2.swc @ONLY) configure_file(data/00_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/00_GT.swc @ONLY) +configure_file(data/01_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/01_GT.swc @ONLY) +configure_file(data/01_T.swc ${CMAKE_CURRENT_BINARY_DIR}/01_T.swc @ONLY) diff --git a/main.cu b/main.cu index f0ad30c..4183c19 100644 --- a/main.cu +++ b/main.cu @@ -37,7 +37,6 @@ stim::gl_network _T; //splitted T // indicator unsigned ind = 0; //indicator of mapping -unsigned swc_ind = 0; //indicator of rendering swc file as networks // relationships std::vector _gt_t; // store indices of nearest edge points in _T for _GT @@ -561,10 +560,8 @@ int main(int argc, char* argv[]) if (args.nargs() >= 1) { // if at least one network file is specified num_nets = 1; // set the number of networks to one std::vector tmp = stim::parser::split(args.arg(0), '.'); // split the filename at '.' - if ("swc" == tmp[1]) { // loading swc file + if ("swc" == tmp[1]) // loading swc file GT.load_swc(args.arg(0)); // load the specified file as the ground truth - swc_ind = 1; // set the indicator of swc file to 1 - } else if ("obj" == tmp[1]) // loading obj file GT.load_obj(args.arg(0)); // load the specified file as the ground truth else { @@ -578,10 +575,15 @@ int main(int argc, char* argv[]) num_nets = 2; //set the number of networks to two sigma = args["sigma"].as_float(); //get the sigma value from the user radius = sigma; - if (1 == swc_ind) //loading swc files + std::vector tmp = stim::parser::split(args.arg(1), '.'); // split the filename at '.' + if ("swc" == tmp[1]) //loading swc files T.load_swc(args.arg(1)); //load the second (test) network - else //loading obj files - T.load_obj(args.arg(1)); + else if ("obj" == tmp[1]) //loading obj files + T.load_obj(args.arg(1)); + else { + std::cout << "Invalid loading file" << std::endl; + exit(1); + } if (args["features"].is_set()) //if the user wants to save features features(args["features"].as_string()); //does it need to be resampled?? -- libgit2 0.21.4