Commit 09cb5950f628309ac65c6b85119d3f16e5bcd0a2

Authored by David Mayerich
1 parent 3a4a7f69

fixed some comments, there is still a bug in the gl_network.h

Showing 1 changed file with 20 additions and 19 deletions   Show diff stats
... ... @@ -24,33 +24,33 @@
24 24  
25 25 //visualization objects
26 26 stim::gl_aaboundingbox<float> bb; //axis-aligned bounding box object
27   -stim::camera cam; //camera object
  27 +stim::camera cam; //camera object
28 28  
29 29 // number of networks
30 30 unsigned num_nets = 0;
31 31  
32 32 // networks
33   -stim::gl_network<float> GT; //ground truth network
34   -stim::gl_network<float> T; //test network
35   -stim::gl_network<float> _GT; //splitted GT
36   -stim::gl_network<float> _T; //splitted T
  33 +stim::gl_network<float> GT; //ground truth network
  34 +stim::gl_network<float> T; //test network
  35 +stim::gl_network<float> _GT; //splitted GT
  36 +stim::gl_network<float> _T; //splitted T
37 37  
38 38 // indicator
39   -unsigned ind = 0; //indicator of mapping
  39 +unsigned ind = 0; //indicator of mapping
40 40  
41 41 // relationships
42   -std::vector<unsigned> _gt_t; // store indices of nearest edge points in _T for _GT
43   -std::vector<unsigned> _t_gt; // store indices of nearest edge points in _GT for _T
  42 +std::vector<unsigned> _gt_t; // store indices of nearest edge points in _T for _GT
  43 +std::vector<unsigned> _t_gt; // store indices of nearest edge points in _GT for _T
44 44  
45 45 //hard-coded parameters
46   -float resample_rate = 0.5f; //sample rate for the network (fraction of sigma used as the maximum sample rate)
47   -float camera_factor = 1.2f; //start point of the camera as a function of X and Y size
48   -float orbit_factor = 0.01f; //degrees per pixel used to orbit the camera
  46 +float resample_rate = 0.5f; //sample rate for the network (fraction of sigma used as the maximum sample rate)
  47 +float camera_factor = 1.2f; //start point of the camera as a function of X and Y size
  48 +float orbit_factor = 0.01f; //degrees per pixel used to orbit the camera
49 49 float zoom_factor = 10.0f;
50 50 float radius_factor = 0.5f;
51 51  
52 52 //mouse click
53   -bool LButtonDown = false; // true when left button down
  53 +bool LButtonDown = false; // true when left button down
54 54 bool RButtonDown = false;
55 55  
56 56 //mouse position tracking
... ... @@ -58,7 +58,7 @@ int mouse_x;
58 58 int mouse_y;
59 59  
60 60 // render modes
61   -bool compareMode = true; // default mode is compare mode
  61 +bool compareMode = true; // default mode is compare mode
62 62 bool mappingMode = false;
63 63  
64 64 // random color set
... ... @@ -68,11 +68,11 @@ std::vector&lt;float&gt; colormap;
68 68 int mods;
69 69  
70 70 //OpenGL objects
71   -GLuint cmap_tex = 0; //texture name for the color map
  71 +GLuint cmap_tex = 0; //texture name for the color map
72 72  
73 73 float delta;
74   -float sigma = 3; //default sigma
75   -float radius = 0.7; //equals to radius
  74 +float sigma = 3; //default sigma
  75 +float radius = 0.7; //equals to radius
76 76 int adjoint_fac = 0;
77 77 int light_fac = 0;
78 78 int difference_fac = 0;
... ... @@ -682,8 +682,7 @@ void advertise(){
682 682 std::cout<<" mapping two files in random colors with a threshold of value"<<std::endl<<std::endl;
683 683 }
684 684  
685   -int main(int argc, char* argv[])
686   -{
  685 +int main(int argc, char* argv[]) {
687 686 stim::arglist args; //create an instance of arglist
688 687  
689 688 //add arguments
... ... @@ -737,9 +736,10 @@ int main(int argc, char* argv[])
737 736 float threshold = args["mapping"].as_float();
738 737 map(sigma, device, threshold);
739 738 }
740   - else
  739 + else {
741 740 compare(sigma, device); //run the comparison algorithm
742 741 }
  742 + }
743 743  
744 744 //if a GUI is requested, display the network using OpenGL
745 745 if(args["gui"].is_set()){
... ... @@ -755,4 +755,5 @@ int main(int argc, char* argv[])
755 755 glutMainLoop(); //enter GLUT event processing cycle
756 756 }
757 757 }
  758 + return 1;
758 759 }
... ...