Commit c4dba76e8580c3f2fa8a8b8a2d951b2ae2fbd8e7
1 parent
a0048e31
added code to test network and fiber subdivision
Showing
1 changed file
with
40 additions
and
0 deletions
Show diff stats
main.cpp
... | ... | @@ -18,11 +18,51 @@ int main(int argc, char* argv[]) |
18 | 18 | exit(1); |
19 | 19 | } |
20 | 20 | |
21 | + float sigma = atof(argv[3]); | |
22 | + | |
21 | 23 | stim::network<float> GT; |
22 | 24 | GT.load_obj(argv[1]); |
23 | 25 | |
26 | + | |
27 | + | |
28 | + | |
29 | + | |
30 | + | |
31 | + | |
32 | + | |
33 | + | |
34 | + | |
35 | + std::cout<<"Network:"<<std::endl<<std::endl; | |
24 | 36 | std::cout<<GT.str(); |
25 | 37 | |
38 | + std::cout<<"Fiber:"<<std::endl<<std::endl; | |
39 | + stim::fiber<float> f; | |
40 | + f = GT.get_fiber(0); | |
41 | + std::cout<<f.str()<<std::endl; | |
42 | + std::cout<<"Fiber length = "<<f.length()<<std::endl; | |
43 | + | |
44 | + std::cout<<"Resampled Fiber:"<<std::endl<<std::endl; | |
45 | + stim::fiber<float> f2; | |
46 | + f2 = f.resample(sigma); | |
47 | + std::cout<<f2.str(); | |
48 | + std::cout<<"Fiber length = "<<f2.length()<<std::endl; | |
49 | + | |
50 | + std::cout<<"Resampled Network:"<<std::endl<<std::endl; | |
51 | + stim::network<float> resampled_GT; | |
52 | + resampled_GT = GT.resample(sigma); | |
53 | + std::cout<<resampled_GT.str(); | |
54 | + | |
55 | + std::cout<<"First Fiber from Resampled Network:"<<std::endl<<std::endl; | |
56 | + stim::fiber<float> f3; | |
57 | + f3 = resampled_GT.get_fiber(0); | |
58 | + std::cout<<f3.str(); | |
59 | + | |
60 | + //stim::fiber<T> f = e.Resample(25.0); | |
61 | + //std::cout<<"resampled fiber length"<<std::endl; | |
62 | + //std::cout<<f.length()<<std::endl; | |
63 | + //std::cout<<"resampled fiber--"<<std::endl; | |
64 | + //std::cout<<f.str()<<std::endl; | |
65 | + | |
26 | 66 | |
27 | 67 | /*std::string groundTruth = argv[1]; |
28 | 68 | std::string truthCase = argv[2]; | ... | ... |