Commit 9585037886221f7517fd4277bce0af6187201428
1 parent
540379da
add two good testing files
Showing
2 changed files
with
11 additions
and
7 deletions
Show diff stats
CMakeLists.txt
@@ -85,3 +85,5 @@ configure_file(data/04_Tb.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Tb.obj @ONLY) | @@ -85,3 +85,5 @@ configure_file(data/04_Tb.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Tb.obj @ONLY) | ||
85 | configure_file(data/1.swc ${CMAKE_CURRENT_BINARY_DIR}/1.swc @ONLY) | 85 | configure_file(data/1.swc ${CMAKE_CURRENT_BINARY_DIR}/1.swc @ONLY) |
86 | configure_file(data/2.swc ${CMAKE_CURRENT_BINARY_DIR}/2.swc @ONLY) | 86 | configure_file(data/2.swc ${CMAKE_CURRENT_BINARY_DIR}/2.swc @ONLY) |
87 | configure_file(data/00_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/00_GT.swc @ONLY) | 87 | configure_file(data/00_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/00_GT.swc @ONLY) |
88 | +configure_file(data/01_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/01_GT.swc @ONLY) | ||
89 | +configure_file(data/01_T.swc ${CMAKE_CURRENT_BINARY_DIR}/01_T.swc @ONLY) |
main.cu
@@ -37,7 +37,6 @@ stim::gl_network<float> _T; //splitted T | @@ -37,7 +37,6 @@ stim::gl_network<float> _T; //splitted T | ||
37 | 37 | ||
38 | // indicator | 38 | // indicator |
39 | unsigned ind = 0; //indicator of mapping | 39 | unsigned ind = 0; //indicator of mapping |
40 | -unsigned swc_ind = 0; //indicator of rendering swc file as networks | ||
41 | 40 | ||
42 | // relationships | 41 | // relationships |
43 | std::vector<unsigned> _gt_t; // store indices of nearest edge points in _T for _GT | 42 | std::vector<unsigned> _gt_t; // store indices of nearest edge points in _T for _GT |
@@ -561,10 +560,8 @@ int main(int argc, char* argv[]) | @@ -561,10 +560,8 @@ int main(int argc, char* argv[]) | ||
561 | if (args.nargs() >= 1) { // if at least one network file is specified | 560 | if (args.nargs() >= 1) { // if at least one network file is specified |
562 | num_nets = 1; // set the number of networks to one | 561 | num_nets = 1; // set the number of networks to one |
563 | std::vector<std::string> tmp = stim::parser::split(args.arg(0), '.'); // split the filename at '.' | 562 | std::vector<std::string> tmp = stim::parser::split(args.arg(0), '.'); // split the filename at '.' |
564 | - if ("swc" == tmp[1]) { // loading swc file | 563 | + if ("swc" == tmp[1]) // loading swc file |
565 | GT.load_swc(args.arg(0)); // load the specified file as the ground truth | 564 | GT.load_swc(args.arg(0)); // load the specified file as the ground truth |
566 | - swc_ind = 1; // set the indicator of swc file to 1 | ||
567 | - } | ||
568 | else if ("obj" == tmp[1]) // loading obj file | 565 | else if ("obj" == tmp[1]) // loading obj file |
569 | GT.load_obj(args.arg(0)); // load the specified file as the ground truth | 566 | GT.load_obj(args.arg(0)); // load the specified file as the ground truth |
570 | else { | 567 | else { |
@@ -578,10 +575,15 @@ int main(int argc, char* argv[]) | @@ -578,10 +575,15 @@ int main(int argc, char* argv[]) | ||
578 | num_nets = 2; //set the number of networks to two | 575 | num_nets = 2; //set the number of networks to two |
579 | sigma = args["sigma"].as_float(); //get the sigma value from the user | 576 | sigma = args["sigma"].as_float(); //get the sigma value from the user |
580 | radius = sigma; | 577 | radius = sigma; |
581 | - if (1 == swc_ind) //loading swc files | 578 | + std::vector<std::string> tmp = stim::parser::split(args.arg(1), '.'); // split the filename at '.' |
579 | + if ("swc" == tmp[1]) //loading swc files | ||
582 | T.load_swc(args.arg(1)); //load the second (test) network | 580 | T.load_swc(args.arg(1)); //load the second (test) network |
583 | - else //loading obj files | ||
584 | - T.load_obj(args.arg(1)); | 581 | + else if ("obj" == tmp[1]) //loading obj files |
582 | + T.load_obj(args.arg(1)); | ||
583 | + else { | ||
584 | + std::cout << "Invalid loading file" << std::endl; | ||
585 | + exit(1); | ||
586 | + } | ||
585 | if (args["features"].is_set()) //if the user wants to save features | 587 | if (args["features"].is_set()) //if the user wants to save features |
586 | features(args["features"].as_string()); | 588 | features(args["features"].as_string()); |
587 | //does it need to be resampled?? | 589 | //does it need to be resampled?? |