Bläddra i källkod

restore the FilterParticles function.

gsp 1 år sedan
förälder
incheckning
a3cea10d8c

+ 23 - 6
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -890,16 +890,29 @@ namespace OTSModelSharp
 
         private void FilterParticles(ref COTSFieldData curFldData)
         {
-            var allparts = curFldData.GetAllParticles();
+          
+            var listXray = curFldData.GetAllParticles().OrderByDescending(x => x.GetActualArea()).ToList();
+            var listXray1 = new List<COTSParticleClr>();
+            var pXRayParam =m_Sample.GetMsrParams().GetXRayParam();
+            if (listXray.Count > pXRayParam.GetXrayLimit())
+            {
+                for (var i = 0; i < pXRayParam.GetXrayLimit(); i++)
+                {
 
-            var analysisParts = new List<COTSParticleClr>();
+                    listXray1.Add(listXray[i]);
+                }
 
-            foreach (var p in allparts)
+            }
+            else
             {
-                analysisParts.Add(p);//there's not any filter rules now.
+                listXray1 = listXray;
             }
 
-            curFldData.SetListAnalysisParticles(analysisParts);
+            curFldData.SetListAnalysisParticles(listXray1);
+
+            log.Info("Analysis particles:" + listXray1.Count);
+
+
         }
 
         public void GetOriginalParticles(ref COTSFieldData curFldData)
@@ -929,8 +942,12 @@ namespace OTSModelSharp
             if (curFldData.NoParticle())
             { // empty fields
                 log.Info("ImageProcess: empty field.");
-
+                return;
             }
+
+          
+            double dPixelSize = m_Sample.CalculatePixelSize();
+            curFldData.InitParticles(pImgProcessParam, dPixelSize);
             return;
         }
        

+ 1 - 7
OTSIncAMeasureApp/ServiceCenter/OxfordExtender/OxfordEDSController.cs

@@ -145,13 +145,7 @@ namespace OTSMeasureApp.ServiceCenter
 
             return true;
         }
-        //private bool SetResolution(int ResolutionWidth, int ResolutionHeight)
-        //{
-            
-        //        strResolution = ResolutionWidth + "x" + ResolutionHeight;
-          
-        //    return true;
-        //}
+   
 
         private bool SetAnalyExpCount(int MaxCounts)
         {

+ 1 - 1
OxfordExtenderWrapper/ExtenderWrapper.cs

@@ -431,7 +431,7 @@ namespace OxfordExtenderWrapper
                 Application.DoEvents();
               
 
-                Thread.Sleep(100);
+              
                 time2 = Environment.TickCount;
                 if (time2-time1 > 20000)
                 {