فهرست منبع

improve some parameter of measure flow and the EDSController

GSP 4 هفته پیش
والد
کامیت
f5052d740a

+ 5 - 5
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CBrightnessContrastAdjust.cs

@@ -64,14 +64,14 @@ namespace OTSMeasureApp._1_OTSMeasure.Measure._3_MeasureFlow
         }
         public bool CheckIsSampleAutoRegulate()
         {
-            if (!m_BrightnessContrastRegulateParam.toRun)
-            {
-                return false;
-            }
-            if (m_BrightnessContrastRegulateParam.autoRegulateType == AutoRegulateType.EverySample)
+            if (m_BrightnessContrastRegulateParam.toRun)
             {
                 return true;
             }
+            //if (m_BrightnessContrastRegulateParam.autoRegulateType == AutoRegulateType.EverySample)
+            //{
+            //    return true;
+            //}
             else
             { 
             return false;   

+ 5 - 5
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CMeasure.cs

@@ -176,11 +176,14 @@ namespace OTSModelSharp
 
             // set working directory which is the same directory of the setting file
             SetWorkingFolderStrAndSaveCurrentSettings();
-     
         
 
             List <string >  listMeasuredSamples = m_ThreadStatus.GetCompletedSamples();
 
+            if (BCregulater.CheckIsSampleAutoRegulate())
+            {
+                BCregulater.DoBrightnessContrastAdjust();
+            }
             // got through measure list
             foreach (var pSample in GetListMeasurableSamples())
             {// check and break if stop button is clicked 
@@ -257,10 +260,7 @@ namespace OTSModelSharp
 
                 m_pProjData.SetWorkingSampleByName(pSample.GetName());
 
-                if (BCregulater.CheckIsSampleAutoRegulate())
-                {
-                    BCregulater.DoBrightnessContrastAdjust();
-                }
+                
                 pSmplMeasure.DoMeasureForOneSample();
 
                

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

@@ -2948,7 +2948,7 @@ namespace OTSMeasureApp
                 double contra0 = 10;
                 double kv0 = 10;
                 m_MeasureAppForm.m_ProjParam.GetWorkingSampleSEMData(ref wd0, ref mag0, ref bri0, ref contra0, ref kv0);
-                if ((mag > 500) && (mag != mag0))
+                if ((mag > 500) && (Math.Abs(mag -mag0)>50))
                 {
                     var rst = MessageBox.Show("Change Magnification to: " + mag.ToString("F2") + "\n" + "Previous Magnification: " + mag0.ToString("F2"), "SEM Data Info", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                     if (rst == DialogResult.Yes)

+ 2 - 2
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -1250,7 +1250,7 @@ namespace OTSMeasureApp
             var ifautoid = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().IfAutoId;
             var knownelements = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().AnalysisElements;
             var eds = EDSController.GetEDSController(GetIWidth(), GetIHeight(), expC, ifautoid, knownelements);
-
+            var sem= SemController.GetSEMController();
             bool r = false;
             //var parts = new List<COTSParticleClr>();
             //parts.Add(selectedPart);
@@ -1316,7 +1316,7 @@ namespace OTSMeasureApp
 
 
             }
-
+            sem.SetScanExternal(false);
             ClassifyParticles(selectedParts);
 
             return r;

+ 6 - 6
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/EDSController.cs

@@ -149,15 +149,15 @@ namespace OTSModelSharp.ServiceCenter
             result= eds.GetXRayByFeatures((uint)a_nXRayAQTime, parts, a_bElementInfo);
 
 
-            if (result == true)
-            {
+            //if (result == true)
+            //{
                 foreach (var p in a_listParticles)
                 {
                     ProcessXrayInfo(p);
                 }
 
 
-            }
+            //}
             return result;
         }
 
@@ -218,15 +218,15 @@ namespace OTSModelSharp.ServiceCenter
 
          
 
-            if (result == true)
-            {
+            //if (result == true)
+            //{
                 foreach (var p in a_listParticles)
                 {
                     ProcessXrayInfo(p);
                 }
 
 
-            }
+            //}
             return result;
         }
       

+ 6 - 4
OTSIncAMeasureApp/ServiceCenter/FEIAutoScript/FEIEDSController.cs

@@ -20,7 +20,7 @@ namespace OTSMeasureApp.ServiceCenter
         /// <summary>
         /// fei面扫这个参数作用是达到这个数值后采集xray操作停止,而ots期望计数率是lowcount的判断标准,两者概念不同,所以此处用常数5000而非ots期望计数率
         /// </summary>
-        const int maxCounts = 8000;
+        const int const_maxCounts = 8000;
 
         public FEIEDSController(int MaxCounts,bool ifautoid,string knownelements)
         {
@@ -39,7 +39,7 @@ namespace OTSMeasureApp.ServiceCenter
                 {
                     List<Point> points = CImageHandler.FindContoursBySegment(width, height, a_listParticles[i].GetFeature().GetSegmentsList());
 
-                    if (!ApiClass.GetXRayByPolygon(points, strResolution, a_nXRayAQTime, maxCounts, a_bElementInfo, ref eleItems, ref spectrumItems))
+                    if (!ApiClass.GetXRayByPolygon(points, strResolution, a_nXRayAQTime, const_maxCounts, a_bElementInfo, ref eleItems, ref spectrumItems))
                     {
                         return false;
                     }
@@ -47,11 +47,12 @@ namespace OTSMeasureApp.ServiceCenter
                 else
                 {
                     Rectangle rectangle = (Rectangle)a_listParticles[i].GetParticleRect();
-                    if (!ApiClass.GetXRayByRect(rectangle, strResolution, a_nXRayAQTime, maxCounts, a_bElementInfo, ref eleItems, ref spectrumItems))
+                    if (!ApiClass.GetXRayByRect(rectangle, strResolution, a_nXRayAQTime, const_maxCounts, a_bElementInfo, ref eleItems, ref spectrumItems))
                     {
                         return false;
                     }
                 }
+
                 var xray = a_listParticles[i].GetXray();
                 xray.SetXrayData(spectrumItems);
                 a_listParticles[i].SetXray(xray);
@@ -78,7 +79,7 @@ namespace OTSMeasureApp.ServiceCenter
                 Point point = (Point)a_listParticles[i].GetXRayPos();
                 Dictionary<string, double> eleItems = new Dictionary<string, double>();
                 uint[] spectrumItems = new uint[2000];
-                if (!ApiClass.GetXRayByPoint(point.X, point.Y, strResolution, a_nXRayAQTime, AnalyExpCount, a_bElementInfo, ref eleItems, ref spectrumItems))
+                if (!ApiClass.GetXRayByPoint(point.X, point.Y, strResolution, a_nXRayAQTime, const_maxCounts, a_bElementInfo, ref eleItems, ref spectrumItems))
                 {
                     return false;
                 }
@@ -157,6 +158,7 @@ namespace OTSMeasureApp.ServiceCenter
             width = ResolutionWidth;
             height = ResolutionHeight;
             strResolution = ResolutionWidth.ToString() + "x" + ResolutionHeight.ToString();
+            //strResolution = "6144x4096";
         }
 
         public bool QuantifyXrayByPart(COTSParticleClr part)