Commit ec9d82e1d508b184ad90be70ccf6d2862fc740ef

Authored by Pavel Govyadinov
1 parent 4166e973

finished the debugging comments and added a feature to better detect the radius

Showing 1 changed file with 13 additions and 5 deletions   Show diff stats
stim/gl/gl_spider.h
@@ -1442,10 +1442,11 @@ class gl_spider // : public virtual gl_texture<T> @@ -1442,10 +1442,11 @@ class gl_spider // : public virtual gl_texture<T>
1442 // CHECK_OPENGL_ERROR 1442 // CHECK_OPENGL_ERROR
1443 // findOptimalDirection(); 1443 // findOptimalDirection();
1444 // Unbind(); 1444 // Unbind();
1445 -  
1446 -// Bind(radius_texID, radius_buffID, numSamplesMag, n_pixels);  
1447 -// findOptimalScale();  
1448 -// Unbind(); 1445 +//THIS IS EXPERIMENTAL
  1446 + Bind(radius_texID, radius_buffID, numSamplesMag, n_pixels);
  1447 + findOptimalScale();
  1448 + Unbind();
  1449 +//THIS IS EXPERIMENTAL
1449 1450
1450 // cL.push_back(curSeed); 1451 // cL.push_back(curSeed);
1451 // cM.push_back(curSeedMag); 1452 // cM.push_back(curSeedMag);
@@ -1633,7 +1634,6 @@ class gl_spider // : public virtual gl_texture<T> @@ -1633,7 +1634,6 @@ class gl_spider // : public virtual gl_texture<T>
1633 { 1634 {
1634 std::cout << nt.sizeE() << " edges " << std::endl; 1635 std::cout << nt.sizeE() << " edges " << std::endl;
1635 std::cout << nt.sizeV() << " nodes " << std::endl; 1636 std::cout << nt.sizeV() << " nodes " << std::endl;
1636 -  
1637 } 1637 }
1638 1638
1639 void 1639 void
@@ -1667,7 +1667,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt; @@ -1667,7 +1667,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
1667 running = false; 1667 running = false;
1668 branchDetection2(); 1668 branchDetection2();
1669 addToNetwork(cL, cM); 1669 addToNetwork(cL, cM);
  1670 + #ifdef DEBUG
1670 std::cerr << "the cost of " << cost << " > " << min_cost << std::endl; 1671 std::cerr << "the cost of " << cost << " > " << min_cost << std::endl;
  1672 + #endif
1671 break; 1673 break;
1672 } else { 1674 } else {
1673 //Have we found the edge of the map? 1675 //Have we found the edge of the map?
@@ -1679,7 +1681,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt; @@ -1679,7 +1681,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
1679 running = false; 1681 running = false;
1680 branchDetection2(); 1682 branchDetection2();
1681 addToNetwork(cL, cM); 1683 addToNetwork(cL, cM);
  1684 + #ifdef DEBUG
1682 std::cerr << "I hit and edge" << std::endl; 1685 std::cerr << "I hit and edge" << std::endl;
  1686 + #endif
1683 break; 1687 break;
1684 } 1688 }
1685 //If this is the first step in the trace, 1689 //If this is the first step in the trace,
@@ -1695,7 +1699,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt; @@ -1695,7 +1699,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
1695 running = false; 1699 running = false;
1696 branchDetection2(); 1700 branchDetection2();
1697 addToNetwork(cL, cM); 1701 addToNetwork(cL, cM);
  1702 + #ifdef DEBUG
1698 std::cerr << "The templates are too big" << std::endl; 1703 std::cerr << "The templates are too big" << std::endl;
  1704 + #endif
1699 break; 1705 break;
1700 } 1706 }
1701 else 1707 else
@@ -1703,7 +1709,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt; @@ -1703,7 +1709,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
1703 h = selectObject(p, getDirection(), m); 1709 h = selectObject(p, getDirection(), m);
1704 //Have we hit something previously traced? 1710 //Have we hit something previously traced?
1705 if(h != -1){ 1711 if(h != -1){
  1712 + #ifdef DEBUG
1706 std::cerr << "I hit the fiber " << h << std::endl; 1713 std::cerr << "I hit the fiber " << h << std::endl;
  1714 + #endif
1707 running = false; 1715 running = false;
1708 branchDetection2(); 1716 branchDetection2();
1709 addToNetwork(cL, cM); 1717 addToNetwork(cL, cM);