Forráskód Böngészése

delete some functions in SmplMeasure.cs and SmlMeasureInc.cs

CXS 5 éve
szülő
commit
f01b4b6639

+ 5 - 5
OTS/OTSModelSharp/Measure/GetBSEPic/SmplMeasure.cs

@@ -1296,15 +1296,15 @@ namespace OTSModelSharp
             return;
         }
 
-        struct EleAreaPercentage
+        public struct EleAreaPercentage
         {
-            EleAreaPercentage(double p, CElementChemistry e)
+            public EleAreaPercentage(double p, CElementChemistry e)
             {
                 areaPercentage = p;
                 eleData = e;
             }
            public double areaPercentage;
-            CElementChemistry eleData;
+           public CElementChemistry eleData;
         };
         public bool MergeBigBoundaryParticles(List<COTSParticle> mergedParts)
         {
@@ -1565,7 +1565,7 @@ namespace OTSModelSharp
                 CPosXray pXray1 = p.GetXrayInfo();
                 foreach (var ele in pXray1.GetElementQuantifyData())
                 {
-                    mapEleData[ele.GetName()].Add(EleAreaPercentage(p.GetArea() / allPartArea, ele));                   
+                    mapEleData[ele.GetName()].Add(new EleAreaPercentage(p.GetArea() / allPartArea, ele));                   
                 }
 
                 foreach (var other in pair.Value)
@@ -1573,7 +1573,7 @@ namespace OTSModelSharp
                     var otherXray = other.GetXrayInfo();
                     foreach (var eledata in otherXray.GetElementQuantifyData())
                     {
-                        mapEleData[eledata.GetName()].Add(EleAreaPercentage(other.GetArea() / allPartArea, eledata));
+                        mapEleData[eledata.GetName()].Add(new EleAreaPercentage(other.GetArea() / allPartArea, eledata));
                     }
                 }
                 // third,we calculate all the element's new percentage data and get a new element chemistry list.

+ 80 - 80
OTS/OTSModelSharp/Measure/GetBSEPic/SmplMeasureInc.cs

@@ -476,86 +476,86 @@ namespace OTSModelSharp.MeasureControl
         }
 
         // classify particles
-       public bool ClassifyParticles(List<COTSParticle> a_listAnalysisParticles, List<CPosXray> a_listAnalysisXRay)
-        {
-            // make sure the two lists are same size
-            int nSize = (int)a_listAnalysisParticles.Count;
-            if (nSize != (int)a_listAnalysisXRay.Count)
-            {
-                // particles list size is different with x-ray size
-                loger.Error("ClassifyParticles: particles list size is different with x-ray size.");
-                return false;
-            }
-
-            // go through all analysis particles
-            for (int i = 0; i < nSize; ++i)
-            {
-                COTSParticle pParticle = a_listAnalysisParticles[i];
-                CPosXray pXray = a_listAnalysisXRay[i];
-
-                if (!ClassifyParticle(pParticle, pXray))
-                {
-                    // failed to call ClassifyParticle method
-                    loger.Error("ClassifyParticles: failed to call ClassifyParticle method.");
-                    return false;
-                }
-            }
-
-            // ok, return TRUE
-            return true;
-        }
-
-      public  bool ClassifyParticle(COTSParticle a_pParticle, CPosXray a_pXRay)
-        {
-            //set the particle type to NOT_IDENTIFIED
-            int nInclusionID = (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED;
-
-            //// 1.get elementChemistries
-           List< CElementChemistry> listElementChemistriesOld = a_pXRay.GetElementQuantifyData();
-
-
-            //get the parameter MsrParam object
-            CMsrParams pMsrParam = m_pSample.GetMsrParams();
-            //get the steel technology parameter
-            STEEL_TECHNOLOGY steelTech = pMsrParam.GetSteelTechnology();
-            //get standard database item which will be used when classify.
-            //CPartSTDDataPtr pPartSTDData = pMsrParam->GetPartSTDData();
-            //int listSize = pPartSTDData->GetSTDItemsList().size();
-            if (m_pSample.IfUsingSysSTD())
-            {
-
-                var IncAen = OTSClassifyEngine.GetInclutionEngine();
-                if (!IncAen->Classify(a_pParticle, (int)steelTech, a_pXRay))
-                {
-                    loger.Error("ClassifyParticle: can't identify the particle as any inclusion.");
-                    return false;
-                }
-                if (a_pParticle.GetType() == (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED)
-                {
-                    var ExpEn = OTSClassifyEngine.GetParticleEngine(m_pSample.GetMsrParams().GetSTDName());
-                    if (!ExpEn->Classify(a_pParticle, a_pXRay))
-                    {
-                        loger.Error("ClassifyParticle: can't identify the particle as any inclusion.");
-                        return false;
-                    }
-                }
-            }
-            else
-            {
-                var ExpEn = OTSClassifyEngine.GetParticleEngine(m_pSample.GetMsrParams().GetSTDName());
-                if (!ExpEn->Classify(a_pParticle, a_pXRay))
-                {
-                    loger.Error("ClassifyParticle: can't identify the particle as any inclusion.");
-                    return false;
-                }
-            }
-
-            nInclusionID = a_pParticle.GetType();
-
-
-            return true;
-
-        }
+       //public bool ClassifyParticles(List<COTSParticle> a_listAnalysisParticles, List<CPosXray> a_listAnalysisXRay)
+       // {
+       //     // make sure the two lists are same size
+       //     int nSize = (int)a_listAnalysisParticles.Count;
+       //     if (nSize != (int)a_listAnalysisXRay.Count)
+       //     {
+       //         // particles list size is different with x-ray size
+       //         loger.Error("ClassifyParticles: particles list size is different with x-ray size.");
+       //         return false;
+       //     }
+
+       //     // go through all analysis particles
+       //     for (int i = 0; i < nSize; ++i)
+       //     {
+       //         COTSParticle pParticle = a_listAnalysisParticles[i];
+       //         CPosXray pXray = a_listAnalysisXRay[i];
+
+       //         if (!ClassifyParticle(pParticle, pXray))
+       //         {
+       //             // failed to call ClassifyParticle method
+       //             loger.Error("ClassifyParticles: failed to call ClassifyParticle method.");
+       //             return false;
+       //         }
+       //     }
+
+       //     // ok, return TRUE
+       //     return true;
+       // }
+
+      //public  bool ClassifyParticle(COTSParticle a_pParticle, CPosXray a_pXRay)
+      //  {
+      //      //set the particle type to NOT_IDENTIFIED
+      //      int nInclusionID = (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED;
+
+      //      //// 1.get elementChemistries
+      //     List< CElementChemistry> listElementChemistriesOld = a_pXRay.GetElementQuantifyData();
+
+
+      //      //get the parameter MsrParam object
+      //      CMsrParams pMsrParam = m_pSample.GetMsrParams();
+      //      //get the steel technology parameter
+      //      STEEL_TECHNOLOGY steelTech = pMsrParam.GetSteelTechnology();
+      //      //get standard database item which will be used when classify.
+      //      //CPartSTDDataPtr pPartSTDData = pMsrParam->GetPartSTDData();
+      //      //int listSize = pPartSTDData->GetSTDItemsList().size();
+      //      if (m_pSample.IfUsingSysSTD())
+      //      {
+
+      //          var IncAen = OTSClassifyEngine.GetInclutionEngine();
+      //          if (!IncAen->Classify(a_pParticle, (int)steelTech, a_pXRay))
+      //          {
+      //              loger.Error("ClassifyParticle: can't identify the particle as any inclusion.");
+      //              return false;
+      //          }
+      //          if (a_pParticle.GetType() == (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED)
+      //          {
+      //              var ExpEn = OTSClassifyEngine.GetParticleEngine(m_pSample.GetMsrParams().GetSTDName());
+      //              if (!ExpEn->Classify(a_pParticle, a_pXRay))
+      //              {
+      //                  loger.Error("ClassifyParticle: can't identify the particle as any inclusion.");
+      //                  return false;
+      //              }
+      //          }
+      //      }
+      //      else
+      //      {
+      //          var ExpEn = OTSClassifyEngine.GetParticleEngine(m_pSample.GetMsrParams().GetSTDName());
+      //          if (!ExpEn->Classify(a_pParticle, a_pXRay))
+      //          {
+      //              loger.Error("ClassifyParticle: can't identify the particle as any inclusion.");
+      //              return false;
+      //          }
+      //      }
+
+      //      nInclusionID = a_pParticle.GetType();
+
+
+      //      return true;
+
+      //  }
 
         // system STD
         bool IfUsingSysSTD() { return m_bSysSTD; }

+ 28 - 32
OTS/OTSModelSharp/Measure/GetBSEPic/SmplMsrResultFile.cs

@@ -277,39 +277,35 @@ namespace OTSModelSharp
             }
         }
 
-       public bool GetSTDMapedParticleList(Dictionary<string, List<COTSParticle>> mapSameSTDPartList)
-        {
-            //把颗粒根据类型分组,类型 ID做key,颗粒列表做value
-
-            Dictionary < string, List<COTSParticle>> partListIter;
-            var listParticle = GetAllParticles();
-            //get the same type particle together
-            foreach (var pParticle in listParticle)
-            {
-                string sType = pParticle.TypeName();
-                int nType = pParticle.GetType();
-                //只有"NOT_IDENTIFIED"以上的颗粒类型需要考虑
-                if (nType >= (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED_SIC)
-                {
-
-                    partListIter = mapSameSTDPartList;                       
-                    if (partListIter == mapSameSTDPartList)
-                    {
-                        List<COTSParticle> listParticles = new List<COTSParticle>();
-                        listParticles.Add(pParticle);
-                        mapSameSTDPartList.Insert(new KeyValuePair<string, List<COTSParticle>>(sType, listParticles));
-                           
-                    }
-                    else
-                    {
-                        partListIter.second.Add(pParticle);
-                    }
+       //public bool GetSTDMapedParticleList(Dictionary<string, List<COTSParticle>> mapSameSTDPartList)
+       // {
+       //     //把颗粒根据类型分组,类型 ID做key,颗粒列表做value
+       //     Dictionary <string, List<COTSParticle>> partListIter;
+       //     var listParticle = GetAllParticles();
+       //     //get the same type particle together
+       //     foreach (var pParticle in listParticle)
+       //     {
+       //         string sType = pParticle.TypeName();
+       //         int nType = pParticle.GetType();
+       //         //只有"NOT_IDENTIFIED"以上的颗粒类型需要考虑
+       //         if (nType >= (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED_SIC)
+       //         {
+       //             partListIter = mapSameSTDPartList;                       
+       //             if (partListIter == mapSameSTDPartList)
+       //             {
+       //                 List<COTSParticle> listParticles = new List<COTSParticle>();
+       //                 listParticles.Add(pParticle);
+       //                 mapSameSTDPartList.Add(new KeyValuePair<string, List<COTSParticle>>(sType, listParticles));
+       //             }
+       //             else
+       //             {
+       //                 partListIter.Values.Append<pParticle>;
+       //             }
+       //         }
 
-                }
-
-            }
-            return true;
-        }
+       //     }
+       //     return true;
+       // }
 
     }
 }

+ 4 - 4
OTS/OTSModelSharp/OTSModelSharp.csproj

@@ -87,9 +87,6 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="ARACrypt.cs" />
-    <Compile Include="COTSEDSBrucker.cs" />
-    <Compile Include="COTSHardwareMgr.cs" />
-    <Compile Include="COTSScanBase.cs" />
     <Compile Include="CProjMgr.cs" />
     <Compile Include="CSmallParticleInfo.cs" />
     <Compile Include="CStdioFile.cs" />
@@ -175,11 +172,14 @@
     <Compile Include="OTSDataType\CIntRange.cs" />
     <Compile Include="OTSDataType\CMsrParams.cs" />
     <Compile Include="OTSDataType\CMsrSampleStatus.cs" />
+    <Compile Include="OTSDataType\COTSEDSBrucker.cs" />
     <Compile Include="OTSDataType\COTSFieldData.cs" />
+    <Compile Include="OTSDataType\COTSHardwareMgr.cs" />
     <Compile Include="OTSDataType\COTSImageProcessParam.cs" />
     <Compile Include="OTSDataType\COTSImageScanParam.cs" />
     <Compile Include="OTSDataType\COTSLicenseInfo.cs" />
     <Compile Include="OTSDataType\COTSSample.cs" />
+    <Compile Include="OTSDataType\COTSScanBase.cs" />
     <Compile Include="OTSDataType\COTSSegment.cs" />
     <Compile Include="OTSDataType\COTSXRayParam.cs" />
     <Compile Include="OTSDataType\CSEMDataGnr.cs" />
@@ -195,6 +195,7 @@
     <Compile Include="OTSDataType\OTSPeak.cs" />
     <Compile Include="OTSDataType\PosXraycs.cs" />
     <Compile Include="OTSDataType\PosXrayInfo.cs" />
+    <Compile Include="OTSDataType\SEMCommonConst.cs" />
     <Compile Include="OTSDataType\SEMStageData.cs" />
     <Compile Include="OTSDataType\stage.cs" />
     <Compile Include="OTSDataType\XMLSerialization.cs" />
@@ -207,7 +208,6 @@
     <Compile Include="MeasureControl\IMeasureHardware.cs" />
     <Compile Include="MeasureControl\MeasureHardware.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SEMCommonConst.cs" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Measure\GetParam\DIALOG_CHECK_PARAM_RESULT.resx">