Explorar el Código

change the D type particle identify rule in the GB calculate module.

gsp hace 1 año
padre
commit
420be1c9dc

+ 4 - 4
OTSCPP/OTSRptCalculate/GBCal/GBFieldData.cpp

@@ -463,9 +463,9 @@ namespace OTSGBCalculate
 			
 				if (adjacentPart == listBAndDParticles.end())//没找到
 				{
-					if (pGBParticle.myPart->GetChemicalType() == GB_CHEMICAL_TYPE::CHE_O)
-					{
-						pGBParticle.myType = GB_LEVEL_TYPE::D_TYPE;
+					/*if (pGBParticle.myPart->GetChemicalType() == GB_CHEMICAL_TYPE::CHE_O)
+					{*/
+						pGBParticle.myType = GB_LEVEL_TYPE::D_TYPE;//no matter what chemical it contains,as long as the aspect ratio is less than 3,then it's a D type.
 
 						//计算颗粒宽度是属于细系粗系还是超尺寸
 						GB_WIDTH_TYPE wt = this->CaculateLevelWidth(pGBParticle.myPart, GB_LEVEL_TYPE::D_TYPE);
@@ -482,7 +482,7 @@ namespace OTSGBCalculate
 							break;
 						}
 						mapAllParticles[pGBParticle.myPart] = GBParticle(pGBParticle.myPart, GB_LEVEL_TYPE::D_TYPE, wt);
-					}
+					//}
 					
 				}
 				else//找到了相邻接的颗粒,不是孤立的则为B类

+ 26 - 3
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -25,7 +25,7 @@ namespace OTSModelSharp
    
 
   public  class CSmplMeasure
-    {
+ {
         protected static NLog.Logger log ;
         protected bool bSaveThreadWorking;
         protected System.Threading.Thread m_thread_ptr;
@@ -157,7 +157,7 @@ namespace OTSModelSharp
             // get dwell time 
             OTS_IMAGE_SCANSPEED_OPTIONS nDwellTime = pImgScanParam.GetScanImageSpeed();
 
-            // convert dwell time to bruker dwell time (8, 16, 32)
+            // convert dwell time to bruker dwell time 
             int nBrukerDwellTimeId;
             switch (nDwellTime)
             {
@@ -223,7 +223,7 @@ namespace OTSModelSharp
             // get dwell time 
             OTS_IMAGE_SCANSPEED_OPTIONS nDwellTime = pImgScanParam.GetScanImageSpeed();
 
-            // convert dwell time to bruker dwell time (6, 16, 32)
+            // convert dwell time to bruker dwell time 
             long nBrukerDwellTime = DWELLTIME_BRUKER_VALUES[2];// choose the third option, so the dwell time will be 4 . there's no need to change here. it shoud be a const.
 
 
@@ -980,6 +980,29 @@ namespace OTSModelSharp
 
                 }
 
+            }
+            if (selconditiondic.ContainsKey("ferret"))
+            {
+                log.Info("Select particles according to ferret");
+                var rng = selconditiondic["ferret"];
+                foreach (var p in curFldData.GetListAnalysisParticles())
+                {
+                    double dferet = p.GetFeretDiameter();
+                    if (dferet < rng.GetStart() || dferet >= rng.GetEnd())
+                    {
+                        if (!excludeparts.Contains(p))
+                        {
+                            excludeparts.Add(p);
+                        }
+                        else
+                        {
+                            log.Info("ferret=" + dferet.ToString("F2"));
+                        }
+
+                    }
+
+                }
+
             }
 
             foreach (var p in curFldData.GetListAnalysisParticles())