Index: /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2049)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2051)
@@ -3,5 +3,6 @@
 
 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+"
-COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -total_samples=1000000000"
+COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter+ -samples_per_evaluation=5000000 -samples_per_pass=1000000 -total_samples=100000000"
+
 
 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d"
@@ -31,5 +32,8 @@
 VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
 
-PREFIX=../work/plots/osp-TEST-1e5
+# SCENE=../data/Pompeii/PompeiiTen.obj
+# VIEWCELLS=../data/Pompeii/pompeii_big-seq-viewcells.xml.gz
+
+PREFIX=../work/plots/osp-FILTER-1e5
 
 #SCENE=../data/atlanta/atlanta2.x3d
@@ -37,15 +41,32 @@
 
 
-# $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
-# -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \
-# -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \
-# -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4l.xml \
-# -preprocessor_stats=$PREFIX-i-mixed-b1-n4l.log \
-# -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4l.hlog
+$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+-rss_distributions=mutation+object_direction+spatial \
+-view_cells_filter_width=1.0 \
+-view_cells_use_kd_pvs+ -af_use_kd_pvs- \
+-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
+-preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \
+-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog
 
-$COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--preprocessor_visibility_file=$PREFIX-r-reference.xml \
--view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
--preprocessor_histogram_file=$PREFIX-r-reference.hlog
+$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+-rss_distributions=mutation+object_direction+spatial \
+-view_cells_filter_width=0.0 \
+-view_cells_use_kd_pvs+ -af_use_kd_pvs- \
+-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4b.xml \
+-preprocessor_stats=$PREFIX-i-mixed-b1-n4b.log \
+-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4b.hlog
+
+$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+-rss_distributions=mutation+object_direction+spatial \
+-view_cells_filter_width=1.0 \
+-view_cells_use_kd_pvs+ -af_use_kd_pvs+ \
+-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4c.xml \
+-preprocessor_stats=$PREFIX-i-mixed-b1-n4c.log \
+-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4c.hlog
+
+# $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+# -preprocessor_visibility_file=$PREFIX-r-reference.xml \
+# -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
+# -preprocessor_histogram_file=$PREFIX-r-reference.hlog
 
 # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/run_test_pompeii
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/run_test_pompeii	(revision 2049)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/run_test_pompeii	(revision 2051)
@@ -8,5 +8,5 @@
 VIEWCELLS=../data/Pompeii/pompeii_big-seq-viewcells.xml.gz
 
-PREFIX=../work/plots/osp-pompeii4-1e5
+PREFIX=../work/plots/osp-pompeiiTEST-1e5
 
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 2048)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 2051)
@@ -1420,5 +1420,5 @@
 					optFloat,
 					"view_cells_filter_width=",
-					"200.0");
+					"1.0");
 
 	RegisterOption("ViewCells.loadFromFile",
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2050)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2051)
@@ -116,5 +116,5 @@
 									pvs);
   }
-
+  
   //  cout<<"pvs size"<<pvs.GetSize()<<endl<<flush;
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/default.env
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/default.env	(revision 2050)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/default.env	(revision 2051)
@@ -61,5 +61,5 @@
 #	type render
 	detectEmptyViewSpace true
-	pvsRenderErrorSamples 20
+	pvsRenderErrorSamples 0
 #	pvsRenderErrorSamples 10000
 	quitOnFinish false
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2048)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2051)
@@ -2456,5 +2456,5 @@
 		  PvsFilterStatistics fstat = ApplyFilter2(viewcell,
 												   false,
-												   1.0f,
+												   mFilterWidth,
 												   filteredPvs);
 		  
@@ -3505,6 +3505,8 @@
 	  }
 #else
-	  radius = 0.5f*globalRadius + 0.5f*localRadius;
-
+
+	  //	  radius = 0.5f*globalRadius + 0.5f*localRadius;
+	  radius = Min(globalRadius, localRadius);
+	  
 	  if (localRadius > globalRadius) 
 		stats.mLocalFilterCount++;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp	(revision 2049)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp	(revision 2051)
@@ -115,4 +115,5 @@
 	}
 
+
 	mMixtureDistribution->UpdateDistributions(vssRays);
 	
@@ -125,11 +126,25 @@
 		"#TotalSamples\n" <<i<<endl<<
 		"#RssSamples\n" <<totalVssRays<<endl;
+
+	  float last = 0.0f;
+	  for (int k=0; k < 6; k++) {
+		float ratio = 0.0f;
+		if (k < mMixtureDistribution->mDistributions.size()) {
+		  ratio = mMixtureDistribution->mDistributions[k]->mRatio-last;
+		  last = mMixtureDistribution->mDistributions[k]->mRatio;;
+		}
+		mStats <<
+		  "#Distribution"<<k<<endl<<
+		  ratio<<endl;
+	  }
+	  
 	  lastEvaluation = i;
-
+	  
 	  if (renderer) {
 		ComputeRenderError();
 	  }
 	}
-
+	
+	
 	long time = TimeDiff(startTime, GetTime());
 	if (mTotalTime!= -1 && time/1000 > mTotalTime)
