1
0

2 Commitit e9428031fd ... 67f1bb9d80

Tekijä SHA1 Viesti Päivämäärä
  gsp 67f1bb9d80 Merge branch 'OTSsteelmineralsystem' of http://36.129.163.148:30080/gogsadmin/OTS into OTSsteelmineralsystem 6 kuukautta sitten
  gsp 5c44a0fd75 improve the particle filter logic 6 kuukautta sitten

+ 4 - 4
Bin/x64/Debug/Config/SysData/OTSProgMgrParam.pmf

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XMLData RunMode="ProfessionalMode" SysType="IncA">
-  <Member RegName="GenParam" DefaultArea="100" DefaultSampleName="Sample" DefaultShape="0" EngineType="3:SpectrumMatch" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="MineralSpectrumSTDLib" SteelTechnology="0" />
-  <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="3:WaterShed" MatrixStep="50" OverlapParam="0" ParticleSelectionCondition="">
+  <Member RegName="GenParam" DefaultArea="100" DefaultSampleName="Sample" DefaultShape="0" EngineType="0:InclustionEngine" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="MineralSpectrumSTDLib" SteelTechnology="0" />
+  <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="0:AUTO" MatrixStep="50" OverlapParam="0" ParticleSelectionCondition="">
     <Member RegName="BGGray" end="50" start="0" />
-    <Member RegName="IncArea" end="2000" start="20" />
+    <Member RegName="IncArea" end="2000" start="3" />
     <Member RegName="ParticleGray" end="255" start="0" />
   </Member>
-  <Member RegName="ImageScanParam" ImageResolution="4:_1536_1024" SatrtImageMode="1:Snake" ScanImageSpeed="0:low" StopMode="0:CoverMode" StopParamArea="10" StopParamFields="100" StopParamMeasTime="360" StopParamParticles="5000" />
+  <Member RegName="ImageScanParam" ImageResolution="3:_1024_768" SatrtImageMode="1:Snake" ScanImageSpeed="0:low" StopMode="0:CoverMode" StopParamArea="10" StopParamFields="100" StopParamMeasTime="360" StopParamParticles="5000" />
   <Member RegName="StageData" ControlDelay="2000" MinMag="65" scanFieldSize="1270" xAxisDir="1:RIGHT_TOWARD" yAxisDir="0:UP_TOWARD">
     <Member RegName="XAxis" end="55000" start="-55000" />
     <Member RegName="YAxis" end="55000" start="-55000" />

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSField.cs

@@ -258,7 +258,7 @@ namespace OTSDataType
         public void FilterParticles(COTSXRayParam pXRayParam)
         {
        
-        log.Info("filter particle according to xraylimit");
+        log.Info("filter particle according to xraylimit and outermost border");
            
            m_listAllParticles.Sort(new particleCompOnArea());
 

+ 2 - 1
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

@@ -262,7 +262,8 @@ namespace OTSDataType
 
         public bool IsThisPointInMeasureArea(Point p)
         {
-            return pFieldMgr.IsThisPointInMeasureArea(p);
+            
+            return pFieldMgr.IsThisPointInMeasureArea(p,this.GetMsrDomain().GetClrDomainObj());
 
 
         }

+ 17 - 12
OTSIncAMeasureApp/1-OTSMeasure/Measure/1-OTSInclution/SmplMeasureInclution.cs

@@ -112,25 +112,30 @@ namespace OTSModelSharp
             var parts = curFldData.GetListAnalysisParticles();
             string libname = m_Sample.GetMsrParams().GetSTDName();
             //process the maxeds rules
-            if (libname != "NoSTDDB")
+            if (m_Sample.GetMsrParams().GetEngineType() == OTS_CLASSIFY_ENGINE_TYPE.InclutionPlusExpressionParse ||
+               m_Sample.GetMsrParams().GetEngineType() == OTS_CLASSIFY_ENGINE_TYPE.ExpressionParse)
             {
-                IClassifyEngine engine = m_classifyEngine.GetExpressionClassifyEngine(libname);
-                double maxedstime = 0;
-                List<COTSParticleClr> maxedsparts = new List<COTSParticleClr>();
-                foreach (var p in parts)
+                if (libname != "NoSTDDB")
                 {
-                    if (engine.IfNeedMaxEDS(p, ref maxedstime))
+                    IClassifyEngine engine = m_classifyEngine.GetExpressionClassifyEngine(libname);
+                    double maxedstime = 0;
+                    List<COTSParticleClr> maxedsparts = new List<COTSParticleClr>();
+                    foreach (var p in parts)
                     {
-                        maxedsparts.Add(p);
+                        if (engine.IfNeedMaxEDS(p, ref maxedstime))
+                        {
+                            maxedsparts.Add(p);
+                        }
                     }
-                }
-                if (maxedsparts.Count > 0)
-                {
-                    log.Warn("Begin to collect MaxEDS particles:" + maxedsparts.Count + "(" + maxedstime.ToString() + ") on Point mode");
+                    if (maxedsparts.Count > 0)
+                    {
+                        log.Warn("Begin to collect MaxEDS particles:" + maxedsparts.Count + "(" + maxedstime.ToString() + ") on Point mode");
 
-                    m_EDSController.GetXRayByParts(maxedsparts, (uint)maxedstime, true);
+                        m_EDSController.GetXRayByParts(maxedsparts, (uint)maxedstime, true);
+                    }
                 }
             }
+            
 
         }
 

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

@@ -913,7 +913,7 @@ namespace OTSModelSharp
             else 
             {
                 log.Info("Begin to filter particles!");
-                curFldData.FilterParticles(m_Sample.GetMsrParams().GetXRayParam());//filter according to the xraylimit
+                curFldData.FilterParticles(m_Sample.GetMsrParams().GetXRayParam());//filter according to the xraylimit and outermost border
 
                 log.Info("Begin to Calculate the image property of every particle!");
                 var analysisparts = curFldData.GetListAnalysisParticles();

+ 3 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/CFieldPositionHelper.cs

@@ -175,8 +175,10 @@ namespace OTSModelSharp
             }
 
         }
-       public bool IsThisPointInMeasureArea(Point p)
+       
+       public bool IsThisPointInMeasureArea(Point p,CDomainClr domain)
         {
+            fieldmgrclr.SetMeasureArea(domain);
           return  fieldmgrclr.IsThisPointInMeasureArea(p);
         
         }

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -2095,7 +2095,7 @@ namespace OTSMeasureApp
 
                     PrepareMeasureField(sam, MSR_RUN_TYPE.RUNMEASURE);
 
-                    //according to the calculated fields rectangle update the measure area.
+                    //according to the calculated fields outermost border rectangle update the measure area.
                     if (m_DrawMeasureType == DrawMeasureAreaActionType.Rectangle)
                     {
                         var rec = sam.GetAllGDIObjectsRectangle();