hacked thresholding
authorDiane Trout <diane@caltech.edu>
Thu, 2 Mar 2006 08:02:56 +0000 (08:02 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 2 Mar 2006 08:02:56 +0000 (08:02 +0000)
This is a quick hack using the older recompute the paths using
a soft threshold code. Once we get the opengl line depth path working
most of this can be reverted.

One of key weaknesses is this calls draw_line repeatedly instead of using
the display list.

Also the reason we have the hack is that properly computing the score for
a path is going to take some more refactoring, in this case probably
coming up with some class to handle generating paths from the lists of
FLPs.

alg/nway_other.cxx
alg/nway_paths.cxx
qui/PathScene.cxx
qui/PathWindow.cxx

index eaa03b5f2c92dbff0ff613298c707099398e4d6f..94df136e5a5d1195296b02d4f5775f6ba2d3fb64 100644 (file)
@@ -253,8 +253,13 @@ NwayPaths::trans_path_search(vector<vector<FLPs> > all_comparisons)
       }
     }
   }
-  clog << "all_cmp=" << all_comparisons.size() 
-       << " path_size=" << pathz.begin()->size() << endl;
-  assert (   (pathz.begin()->size() == 0) 
+  clog << "all_cmp=" << all_comparisons.size();
+  if (pathz.begin() != pathz.end())
+    clog << " path_size=" << pathz.begin()->size();
+  else 
+    clog << " path empty";
+  clog << endl;
+  assert (   (pathz.begin() == pathz.end())
+          || (pathz.begin()->size() == 0) 
           || (all_comparisons.size() == pathz.begin()->size()));
 }
index 48b68f83a82423f19830ecfc02e11271eb35ddbf..69184b55ab7483eab8f22c58fc7cc0f901bf29e6 100644 (file)
@@ -44,8 +44,6 @@ NwayPaths::set_soft_thres(int sft_thres)
 }
 
 
-
-
 // dumbly goes thru and combines path windows exactly adjacent (ie + 1 index)
 // doesn't deal with interleaved adjacency
 void
@@ -258,8 +256,6 @@ NwayPaths::load(string load_file_path)
 }
 
 
-
-
 void
 NwayPaths::path_search(vector<vector<FLPs> > all_comparisons, ConservedPath path, int depth)
 {
index a38088cf8783d8b47a0945cf663bf030693c64eb..f4579a327d2e7753e66f72c0b08fc1b74837839f 100644 (file)
@@ -358,12 +358,12 @@ GLuint PathScene::make_line_list()
 
 void PathScene::mussaesque()
 {
-  static GLuint theLines = make_line_list();
+  //static GLuint theLines = make_line_list();
 
   glInitNames();
   glPushName(10);
-  glCallList(theLines);
-  //draw_lines();
+  //glCallList(theLines);
+  draw_lines();
   glLoadName(0);
   draw_tracks();
   glPopName();
index bb6dbf4b4641fa10c7616942bc0a2541f35d2be4..95188f53c5686d22862125ccb554b43eb8979d2a 100644 (file)
@@ -34,10 +34,14 @@ PathWindow::PathWindow(QWidget *) :
   mussaViewTB->addAction(toggleMotifsAction);
 
   ThresholdWidget *threshold = new ThresholdWidget;
-  threshold->setRange(21, 30);
-  scene->setClipPlane(21);
+  threshold->setRange(19, 30);
+  threshold->setThreshold(19);
+  scene->setClipPlane(20);
+  // FIXME: for when we get the paths drawn at the appropriate depth
+  //connect(threshold, SIGNAL(thresholdChanged(int)),
+  //        scene, SLOT(setClipPlane(int)));
   connect(threshold, SIGNAL(thresholdChanged(int)),
-          scene, SLOT(setClipPlane(int)));
+          scene, SLOT(setSoftThreshold(int)));
   mussaViewTB->addWidget(threshold);
 
   //Image Save Dialog