Browse Source

remove the otsmining code

gsp 2 năm trước cách đây
mục cha
commit
3114f5d173

+ 4 - 4
OTS.sln

@@ -422,8 +422,8 @@ Global
 		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.CleannessRelease|x86.Build.0 = CleannessRelease|Any CPU
 		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|x64.Build.0 = Debug|Any CPU
+		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|x64.ActiveCfg = Debug|x64
+		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|x64.Build.0 = Debug|x64
 		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Debug|x86.Build.0 = Debug|Any CPU
 		{BBA845E8-27ED-4832-90FA-32F737E1FCA7}.Release_oxford50|Any CPU.ActiveCfg = Release|Any CPU
@@ -470,8 +470,8 @@ Global
 		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.CleannessRelease|x86.Build.0 = Release|Any CPU
 		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|x64.Build.0 = Debug|Any CPU
+		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|x64.ActiveCfg = Debug|x64
+		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|x64.Build.0 = Debug|x64
 		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Debug|x86.Build.0 = Debug|Any CPU
 		{83412BF0-F802-456C-8A33-7C6CD5B6704D}.Release_oxford50|Any CPU.ActiveCfg = Release|Any CPU

+ 3 - 3
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CMeasure.cs

@@ -316,9 +316,9 @@ namespace OTSModelSharp
                         case OTS_SysType_ID.CleannessA:
                             pSmplMeasure = new CSmplMeasureCleanliness(m_strWorkingFolder, pSample);
                             break;
-                        case OTS_SysType_ID.MiningA:
-                            pSmplMeasure = new CSmplMeasureMining(m_strWorkingFolder, pSample);
-                            break;
+                        //case OTS_SysType_ID.MiningA:
+                        //    pSmplMeasure = new CSmplMeasureMining(m_strWorkingFolder, pSample);
+                        //    break;
                         default:
                             pSmplMeasure = new CSmplMeasureInclution(m_strWorkingFolder, pSample);
                             break;

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

@@ -793,8 +793,7 @@ namespace OTSModelSharp
             int scanfldsize = theSample.GetSEMDataMsr().GetScanFieldSize();
             List<COTSParticleClr> mergedParticles = new List<COTSParticleClr>();
             double pixelSize = theSample.CalculatePixelSize();
-            if (this.GetType() != typeof(CSmplMeasureMining))//mining system no need to merge boundary parts
-            {
+           
                 imgpro.MergeBigBoundaryParticles(theSample.GetFieldsData(), pixelSize, scanfldsize, theSample.GetResolutionSize(), ref mergedParticles);
 
                 CalculateMergedPartProperty(mergedParticles, pixelSize);
@@ -805,7 +804,7 @@ namespace OTSModelSharp
 
                 SaveMergedParticles(mergedParticles);
 
-            }
+           
            
 
 

+ 0 - 35
OTSIncAMeasureApp/0-OTSModel/Measure/5-OTSMining/CFieldDataMining.cs

@@ -1,35 +0,0 @@
-using OTSCLRINTERFACE;
-using OTSDataType;
-using OTSMeasureApp._0_OTSModel.Measure._5_OTSMining;
-using OTSModelSharp.ServiceCenter;
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace OTSModelSharp.Measure
-{
-    class CFieldDataMining : COTSFieldData
-    {
-       public    CFieldDataMining(Point center, double a_dPixelSize) : base(center, a_dPixelSize)
-        {
-
-        }
-      
-        //List<CMatrixXrayParticle> matrixParts = new List<CMatrixXrayParticle>();
-        // particle list
-        //public void SplitRawParticleIntoMatricsParticleByXrayStep(List<COTSParticleClr> particles, double xrayStep)
-        //{
-        //    m_ImagePro = new CImageHandler();
-        //    foreach (COTSParticleClr part in particles)
-        //    {
-
-        //        m_ImagePro.(part, m_pixelSize);
-        //    }
-        //    return true;
-
-        //}
-    }
-}

+ 0 - 22
OTSIncAMeasureApp/0-OTSModel/Measure/5-OTSMining/CMatrixXrayParticle.cs

@@ -1,22 +0,0 @@
-
-
-using OTSCLRINTERFACE;
-using System.Collections.Generic;
-
-namespace OTSMeasureApp._0_OTSModel.Measure._5_OTSMining
-{
-    public class CMatrixXrayParticle :COTSParticleClr
-    {
-        private int xrayStep;
-        private List<CPosXrayClr> matrixXrayData=new List<CPosXrayClr>();
-        public CMatrixXrayParticle()
-        {
-            // This constructor is used when an object is loaded from a persistent storage.
-            // Do not place any code here.
-        }
-
-        public int XrayStep { get => xrayStep; set => xrayStep = value; }
-        
-    }
-
-}

+ 0 - 358
OTSIncAMeasureApp/0-OTSModel/Measure/5-OTSMining/SmplMeasureMining.cs

@@ -1,358 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-using System.Drawing;
-using System.Linq;
-using System.Threading;
-using OTSCLRINTERFACE;
-using OTSDataType;
-using OTSModelSharp.ServiceCenter;
-namespace OTSModelSharp
-{
-    class CSmplMeasureMining : CSmplMeasure
-    {
-
-        public CSmplMeasureMining(string a_strWorkingFolder, COTSSample a_pSample) : base(a_strWorkingFolder, a_pSample)
-        {
-            SetWorkingFolder(a_strWorkingFolder);
-            SetSample(a_pSample);
-            m_classifyEngine = new CClassifyEngine();
-          
-        }
-
-
-
-        public override bool FieldImageProcess(COTSFieldData curFldData, CBSEImgClr a_pBSEImg)
-       {
-         
-
-            PointF fldCenter = curFldData.OTSPos;
-
-            curFldData.SetBSEImage(a_pBSEImg);
-            CSEMStageData a_pCSEMStageData = m_pMsrThread.GetProjResultData().GetSEMStageData();
-            PointF semPos = new Point();
-            a_pCSEMStageData.ConvertOTSToSEMCoord(fldCenter, ref semPos);
-
-            curFldData.SetSemPos(semPos);
-
-            //first step:remove background of the bse image and compound all the finded particles.
-
-            log.Info("Begin to process image and get all particles!");
-            GetOriginalParticles(ref curFldData);
-
-            // second step :filter the finded particles.
-            log.Info("Begin to filter particles!");
-
-            FilterParticles(ref curFldData);
-
-            CalculateParticleAbsolutPos(ref curFldData);
-
-            log.Info("Begin to Calculate the image property of every particle!");
-            var analysisparts = curFldData.GetListAnalysisParticles();
-            //calculate particle image property such as feret diameter, DMAX etc and calculate the xray point position simultaneously.
-            COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
-            CDoubleRange ecdRange = m_Sample.GetMsrParams().GetImageProcessParam().GetIncAreaRange();
-            var pimageParam = m_Sample.GetMsrParams().GetImageScanParam();
-            int width = pimageParam.GetImageResolutionSize().cx;
-            int height = pimageParam.GetImageResolutionSize().cy;
-            var xrayStep = pXRayParam.XrayStep;
-            
-            CImageHandler imgHandle = new CImageHandler();
-            if (xrayStep == 0)
-            {
-               
-                foreach (var p in analysisparts)
-                {
-                    imgHandle.SplitRawParticleIntoGreyScaleParticle(p,new CDoubleRangeClr(ecdRange.GetStart(),ecdRange.GetEnd()),  m_Sample.CalculatePixelSize(), a_pBSEImg);
-                }
-            }
-            else 
-            {
-                foreach (var p in analysisparts)
-                {
-                    imgHandle.SplitRawParticleIntoMatrixParticleByXrayStep(p, width, height, m_Sample.CalculatePixelSize(), xrayStep);
-                }
-
-            }
-            
-            if (pXRayParam.GetUsingXray() == true)
-            {
-                log.Info("Begin to collect particle's xray data!");
-                Thread.Sleep(100);
-
-                m_EDSHardwareMgr.SetResolution(a_pBSEImg.GetWidth(), a_pBSEImg.GetHeight());
-
-                CollectParticlesXrayData(curFldData);
-
-                Thread.Sleep(100);
-            }
-
-
-            ClassifyFieldParticles(curFldData);
-            if (xrayStep > 0)//while doing matrix xray gethering,merge all the segments in this field by the classify id.
-            {
-                MergeSubParticleByTheXrayClassification(curFldData, m_Sample.CalculatePixelSize());
-            }
-            else 
-            {
-                ConvertSubParticleToFieldParticle(curFldData, m_Sample.CalculatePixelSize());
-            }
-           
-
-            //curFldData.CalParticleImageProp(curFldData.GetListAnalysisParticles(), 0);//recalculate the image property of the new merged particles.
-
-            m_Sample.GetMsrStatus().SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
-
-
-
-            return true;
-
-        }
-        public override void CollectParticlesXrayData(COTSFieldData curFldData)
-        {
-            // get x-ray parameters
-            COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
-
-            // calculate search x-ray acquire time
-            uint nXRayAQTime;
-            List<COTSParticleClr> parts = new List<COTSParticleClr>();
-
-            foreach (var p in curFldData.GetListAnalysisParticles())
-            {
-                if (p.IsXrayParticle())
-                {
-                    var subps = p.GetSubParticles();
-                    foreach (var subp in subps)
-                    {
-                        subp.SetIsXrayParticle(true);
-                    }
-                    parts.Add(p);
-                }
-            }
-        
-
-            if (parts.Count > 0)
-            {
-
-                nXRayAQTime = (uint)pXRayParam.GetMidAnalyAQTime();
-                m_EDSHardwareMgr.GetXRayBySubParticles(parts, nXRayAQTime);
-  
-               
-            }
-
-
-            return;
-        }
-
-
-        public override void ClassifyFieldParticles(COTSFieldData curFldData)
-        {
-           
-            try
-            {
-             
-                string libname = m_Sample.GetMsrParams().GetSTDName();
-                if (libname != "NoSTDDB")
-                {
-                   log.Info("Begin to classify  particles!Using " + libname);
-                    
-                    var parts = curFldData.GetListAnalysisParticles();
-
-                    foreach (var p in parts)
-                    {
-                        ClassifyParticlesBySpectrum(p.GetSubParticles(), libname);
-                    }
-                  
-                   
-                }
-
-            }
-            catch (Exception e)
-		    {
-                log.Info("calcu the particle image property or classify failed. "+e.Message);
-            }
-
-
-        }
-
-        private void MergeSubParticleByTheXrayClassification(COTSFieldData curFldData,double pixelSize)
-        {
-            var rawParts = curFldData.GetListAnalysisParticles();
-           
-            var finalParts = new List<COTSParticleClr>();
-            foreach (var rawPart in rawParts)
-            {
-                Dictionary<int, List<COTSParticleClr>> dicParts = new Dictionary<int, List<COTSParticleClr>>();// group all the parts according to the classify id.
-                var subParts = rawPart.GetSubParticles();
-                foreach (var matricsPart in subParts)
-                {
-                    if (!dicParts.ContainsKey(matricsPart.GetClassifyId()))
-                    {
-                        List<COTSParticleClr> parts = new List<COTSParticleClr>();
-                        parts.Add(matricsPart);
-                        dicParts.Add(matricsPart.GetClassifyId(), parts);
-                    }
-                    else 
-                    {
-                        dicParts[matricsPart.GetClassifyId()].Add(matricsPart);
-                    }
-                
-                }
-               
-                foreach (var typeParts in dicParts)//merge all  parts in the same group.
-                {
-                    var firstPart = typeParts.Value[0];
-                    if (typeParts.Value.Count > 0)
-                    {
-                       
-                     var   segs = firstPart.GetFeature().GetSegmentsList();
-                        for (int i = 1; i < typeParts.Value.Count; i++)
-                        {
-                            segs.AddRange(typeParts.Value[i].GetFeature().GetSegmentsList());
-                        }
-
-                        var mergedSegs = MergeSegments(segs);
-                        firstPart.GetFeature().SetSegmentsList(mergedSegs, false);
-
-                    }
-                    firstPart.SetAnalysisId(finalParts.Count);
-                    firstPart.SetParticleId(finalParts.Count);
-                    double pixelarea = firstPart.GetPixelArea();
-                    double actualArea = pixelarea * pixelSize;
-                    firstPart.SetActualArea(actualArea);
-                    finalParts.Add(firstPart);
-
-                }
-
-            }
-           
-
-            curFldData.SetListAnalysisParticles(finalParts);
-
-
-        }
-
-        List<COTSSegmentClr> MergeSegments(List<COTSSegmentClr> allSegs)
-        {
-            Dictionary<int, SortedList<int,COTSSegmentClr>> dicSegs = new Dictionary<int, SortedList<int,COTSSegmentClr>>();
-            List<COTSSegmentClr> finalSegs = new List<COTSSegmentClr>();
-            foreach (var seg in allSegs)
-            {
-                if (!dicSegs.ContainsKey(seg.GetHeight()))
-                {
-                    SortedList<int,COTSSegmentClr> sameHeightSegs = new SortedList<int,COTSSegmentClr>();
-                    sameHeightSegs.Add(seg.GetStart(),seg);
-                    dicSegs.Add(seg.GetHeight(), sameHeightSegs);
-                }
-                else
-                {
-                    var sortSegs = dicSegs[seg.GetHeight()];
-                    var start = seg.GetStart();
-                    if (!sortSegs.ContainsKey(seg.GetStart()))
-                    {
-
-                        sortSegs.Add(seg.GetStart(), seg);
-                    }
-                    else 
-                    {
-                        var equalStartSeg = sortSegs[start];
-
-                        var L1 = seg.GetLength();
-                        var L2 = equalStartSeg.GetLength();
-                        if (L1 > L2)
-                        {
-
-                            sortSegs.Remove(start);
-                            sortSegs.Add(start, seg);
-                        }
-
-
-                    }
-
-                }
-            }
-
-                foreach (var sameHeightSegs in dicSegs)
-                {
-                var currentSeg = sameHeightSegs.Value.Values[0];
-                    for (int i=1;i<sameHeightSegs.Value.Count;i++) 
-                    {
-                        var otherSameHeightSeg = sameHeightSegs.Value.Values[i];
-                    var otherStart = otherSameHeightSeg.GetStart();
-                    var curEnd = currentSeg.GetEnd();
-                        if (otherStart - curEnd <= 1)//they are connecting
-                        {
-                            currentSeg.SetEnd(otherSameHeightSeg.GetEnd());
-                        }
-                        else 
-                        {
-                          finalSegs.Add(currentSeg);
-                          currentSeg = otherSameHeightSeg;
-                          continue;
-                        }
-                    }
-                    finalSegs.Add(currentSeg);
-                 }
-
-            return finalSegs;
-        }
-        private void ConvertSubParticleToFieldParticle(COTSFieldData curFldData, double pixelSize)
-        {
-            var rawParts = curFldData.GetListAnalysisParticles();
-
-            var finalParts = new List<COTSParticleClr>();
-            foreach (var rawPart in rawParts)
-            {
-              
-                var subParts = rawPart.GetSubParticles();
-                foreach (var subPart in subParts)
-                {
-                    subPart.SetAnalysisId(finalParts.Count);
-                    subPart.SetParticleId(finalParts.Count);
-                    subPart.SetFieldId(rawPart.GetFieldId());
-                    double pixelarea = subPart.GetPixelArea();
-                    double actualArea = pixelarea * pixelSize;
-                    subPart.SetActualArea(actualArea);
-                    finalParts.Add(subPart);
-
-                }
-
-                
-
-            }
-
-
-            curFldData.SetListAnalysisParticles(finalParts);
-
-
-        }
-
-        public bool ClassifyParticlesBySpectrum(List<COTSParticleClr> matricsParts, string libname)
-        {
-            List<COTSParticleClr> a_listAnalysisParticles = matricsParts;
-
-            int nSize = (int)a_listAnalysisParticles.Count();
-
-            // go through all analysis particles
-            for (int i = 0; i < nSize; ++i)
-            {
-                var pParticle = a_listAnalysisParticles[i];
-               
-                IClassifyEngine engine = m_classifyEngine.GetCurveCompareEngine(libname);
-               
-                    if (!engine.Classify(pParticle))
-                    {
-                        log.Info("ClassifyParticle: can't identify the particle as any inclusion.");
-                        return false;
-                    }
-               
-                
-            }
-            return true;
-        }
-
-       
-
-
-    }
-}

+ 2 - 4
OTSIncAMeasureApp/0-OTSModel/Measure/DBDataTransition/MergedParticles/MergeParticleDB.cs

@@ -7,9 +7,7 @@ using System.Data;
 using System.Data.SQLite;
 using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
+
 
 namespace OTSModelSharp
 {
@@ -56,7 +54,7 @@ namespace OTSModelSharp
             paras[24].Value = a_pParticle.GetFeretDiameter();
             paras[25].Value = a_pParticle.GetTypeName();
             paras[26].Value = a_pParticle.GetTypeColor();
-            paras[27].Value = a_pParticle.GetConnectedParticlesName();
+            paras[27].Value = a_pParticle.GetSubParticles();
 
             List<KeyValuePair<string, SQLiteParameter[]>> cmds = new List<KeyValuePair<string, SQLiteParameter[]>>();
             cmds.Add(cmd);

+ 3 - 10
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -714,15 +714,8 @@ namespace OTSMeasureApp
 
                 var imageHandle = new CImageHandler();
                 m_systype = m_MeasureAppForm.m_ProjParam.GetResultData().m_systemTypeId;
-                if (m_systype == otsdataconst.OTS_SysType_ID.MiningA)
-                {
-                    coloredParticleImage = new Bitmap(m_iWidth, m_iHeight);
-                    bfResult = imageHandle.GetColoredImage(imageProcessParam, pixelSize, originalBseData, m_iWidth, m_iHeight, ref coloredParticleImage);
-                    m_imagetype = ImageType.ColorParticleImage;
-          
-                }
-                else
-                {
+               
+               
                     bfResult = imageHandle.GetBSEImage(imageProcessParam, pixelSize, originalBseData, m_iWidth, m_iHeight, ref removeBGBseData);
                     m_IsShowImageType = ImageType.RemoveBGImage;
                     m_imagetype = ImageType.RemoveBGImage;
@@ -736,7 +729,7 @@ namespace OTSMeasureApp
                     {
                         dGrayAbandonLevelMax = Math.Max(dGrayAbandonLevelMax, dGrayAbandonLevelData[i]);
                     }
-                }
+              
                
 
 

+ 4 - 7
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -200,10 +200,6 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\OpenDll\WordApiDll\OTS.WinFormsUI.Docking.dll</HintPath>
     </Reference>
-    <Reference Include="OTSClrInterface, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Bin\x64\Release_oxford60\OTSClrInterface.dll</HintPath>
-    </Reference>
     <Reference Include="SlmRuntimeCSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\Bin\x64\Release_oxford50\SlmRuntimeCSharp.dll</HintPath>
@@ -256,9 +252,6 @@
     <Compile Include="0-OTSModel\Measure\3-MeasureFlow\CSmplMsrResult.cs" />
     <Compile Include="0-OTSModel\Measure\3-MeasureFlow\MsrThreadStatus.cs" />
     <Compile Include="0-OTSModel\Measure\4-ReMeasure\SmplMeasureReMeasure.cs" />
-    <Compile Include="0-OTSModel\Measure\5-OTSMining\CFieldDataMining.cs" />
-    <Compile Include="0-OTSModel\Measure\5-OTSMining\CMatrixXrayParticle.cs" />
-    <Compile Include="0-OTSModel\Measure\5-OTSMining\SmplMeasureMining.cs" />
     <Compile Include="0-OTSModel\Measure\BSEPicData\BSEImgFileMgr.cs" />
     <Compile Include="0-OTSModel\Measure\BSEPicData\COTSFieldData.cs" />
     <Compile Include="0-OTSModel\Measure\DBDataTransition\CFieldDB.cs" />
@@ -909,6 +902,10 @@
       <Project>{3b7695aa-8231-45ac-b493-84390a945d02}</Project>
       <Name>OTSCommon</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OTSCPP\OTSClrInterface\OTSClrInterface.vcxproj">
+      <Project>{490a8592-7b13-4536-b475-028e73007fae}</Project>
+      <Name>OTSClrInterface</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

+ 97 - 109
OTSIncAMeasureApp/ServiceCenter/CImageHandler.cs

@@ -109,28 +109,28 @@ namespace OTSModelSharp.ServiceCenter
 
             return true;
         }
-        public bool GetColoredImage(COTSImageProcParam ImgProcPrm, double pixelSize, byte[] BSEImage, int iWidth, int iHeight, ref Bitmap BSEImageNoBG)
-        {
-            Rectangle rect = new Rectangle();
-            rect.Height = iHeight;
-            rect.Width = iWidth;
-            CBSEImgClr pBSEImageIn = new CBSEImgClr(rect);
+        //public bool GetColoredImage(COTSImageProcParam ImgProcPrm, double pixelSize, byte[] BSEImage, int iWidth, int iHeight, ref Bitmap BSEImageNoBG)
+        //{
+        //    Rectangle rect = new Rectangle();
+        //    rect.Height = iHeight;
+        //    rect.Width = iWidth;
+        //    CBSEImgClr pBSEImageIn = new CBSEImgClr(rect);
            
 
 
            
-            pBSEImageIn.SetImageData(BSEImage, iWidth, iHeight);
+        //    pBSEImageIn.SetImageData(BSEImage, iWidth, iHeight);
          
-            if (null == ImgProcPrm)
-            {
-                return false;
-            }
+        //    if (null == ImgProcPrm)
+        //    {
+        //        return false;
+        //    }
 
-            RemoveBGAndGetColoredParts(pBSEImageIn, ImgProcPrm, pixelSize, ref BSEImageNoBG);//RemoveBGAndGetColoredParts
+        //    RemoveBGAndGetColoredParts(pBSEImageIn, ImgProcPrm, pixelSize, ref BSEImageNoBG);//RemoveBGAndGetColoredParts
 
 
-            return true;
-        }
+        //    return true;
+        //}
 
         /// <summary>
         /// 获取测量的BSE图
@@ -285,95 +285,96 @@ namespace OTSModelSharp.ServiceCenter
           
             return;
         }
-        private void RemoveBGAndGetColoredParts(CBSEImgClr a_pImgIn, COTSImageProcParam a_pImgProcessParam, double a_pixelSize, ref Bitmap a_pImgOut)
-        {
-
-
-            List<COTSParticleClr> parts = new List<COTSParticleClr>();
-            List<COTSParticleClr> specialGreyparts = new List<COTSParticleClr>();
-            var ecdrange = a_pImgProcessParam.GetIncAreaRange();
-            if (!RemoveBGAndGetParts(a_pImgIn, a_pImgProcessParam, a_pixelSize, ref parts))
-            {
-                return;
-            }
-
-            if (a_pImgProcessParam.GetSpecialGreyRangeParam().GetIsToRun())
-            {
-                var param = a_pImgProcessParam.GetSpecialGreyRangeParam();
-                var ranges = param.GetSpecialGreyRanges();
-
-
-                foreach (var r in ranges)
-                {
-                    CIntRangeClr r1 = new CIntRangeClr();
-                    r1.SetStart(r.range.GetStart());
-                    r1.SetEnd(r.range.GetEnd());
-
-                    CDoubleRangeClr r2 = new CDoubleRangeClr();
-                    r2.SetStart(r.diameterRange.GetStart());
-                    r2.SetEnd(r.diameterRange.GetEnd());
-
-                    GetParticlesBySpecialGray(a_pImgIn, r1, r2, a_pixelSize, ref specialGreyparts);
-                }
-
-            }
-
-
-            for (int i = 0; i < a_pImgOut.Width; i++)
-            {
-                for (int j = 0; j < a_pImgOut.Height; j++)
-                {
-                    a_pImgOut.SetPixel(i, j, Color.White);
-                }
-            }
-            if (specialGreyparts.Count > 0)
-            {
-                foreach (var p in specialGreyparts)
-                {
-                    Color cValue = GetRandomColor30();
-                    foreach (var s in p.GetFeature().GetSegmentsList())
-                    {
-                        for (int i = s.GetStart(); i < s.GetStart() + s.GetLength(); i++)
-                        {
-                            var bseValue = a_pImgIn.GetBSEValue(i, s.GetHeight());
-                            a_pImgOut.SetPixel(i, s.GetHeight(), cValue);
-                        }
-                    }
-
-                }
-
-            }
-
-
-            foreach (var p in parts)
-            {
-                OTSCLRINTERFACE.ImageProForClr imgpro = new OTSCLRINTERFACE.ImageProForClr();
-                imgpro.SplitRawParticleIntoGreyScaleParticle(p, new CDoubleRangeClr(ecdrange.GetStart(), ecdrange.GetEnd()), a_pixelSize, a_pImgIn);
-                //imgpro.SplitRawParticleIntoWaterShedParticle(p, new CDoubleRangeClr(ecdrange.GetStart(), ecdrange.GetEnd()), a_pixelSize, a_pImgIn);
-                var subparts = p.GetSubParticles();
-                foreach (var subp in subparts)
-                {
-                    Color cValue = GetRandomColor30();
-                    foreach (var s in subp.GetFeature().GetSegmentsList())
-                    {
-
-                        for (int i = s.GetStart(); i < s.GetStart() + s.GetLength(); i++)
-                        {
+        //private void RemoveBGAndGetColoredParts(CBSEImgClr a_pImgIn, COTSImageProcParam a_pImgProcessParam, double a_pixelSize, ref Bitmap a_pImgOut)
+        //{
+
+
+        //    List<COTSParticleClr> parts = new List<COTSParticleClr>();
+        //    List<COTSParticleClr> specialGreyparts = new List<COTSParticleClr>();
+        //    var ecdrange = a_pImgProcessParam.GetIncAreaRange();
+        //    if (!RemoveBGAndGetParts(a_pImgIn, a_pImgProcessParam, a_pixelSize, ref parts))
+        //    {
+        //        return;
+        //    }
+
+        //    if (a_pImgProcessParam.GetSpecialGreyRangeParam().GetIsToRun())
+        //    {
+        //        var param = a_pImgProcessParam.GetSpecialGreyRangeParam();
+        //        var ranges = param.GetSpecialGreyRanges();
+
+
+        //        foreach (var r in ranges)
+        //        {
+        //            CIntRangeClr r1 = new CIntRangeClr();
+        //            r1.SetStart(r.range.GetStart());
+        //            r1.SetEnd(r.range.GetEnd());
+
+        //            CDoubleRangeClr r2 = new CDoubleRangeClr();
+        //            r2.SetStart(r.diameterRange.GetStart());
+        //            r2.SetEnd(r.diameterRange.GetEnd());
+
+        //            GetParticlesBySpecialGray(a_pImgIn, r1, r2, a_pixelSize, ref specialGreyparts);
+        //        }
+
+        //    }
+
+
+        //    for (int i = 0; i < a_pImgOut.Width; i++)
+        //    {
+        //        for (int j = 0; j < a_pImgOut.Height; j++)
+        //        {
+        //            a_pImgOut.SetPixel(i, j, Color.White);
+        //        }
+        //    }
+        //    if (specialGreyparts.Count > 0)
+        //    {
+        //        foreach (var p in specialGreyparts)
+        //        {
+        //            Color cValue = GetRandomColor30();
+        //            foreach (var s in p.GetFeature().GetSegmentsList())
+        //            {
+        //                for (int i = s.GetStart(); i < s.GetStart() + s.GetLength(); i++)
+        //                {
+        //                    var bseValue = a_pImgIn.GetBSEValue(i, s.GetHeight());
+        //                    a_pImgOut.SetPixel(i, s.GetHeight(), cValue);
+        //                }
+        //            }
+
+        //        }
+
+        //    }
+
+
+        //    foreach (var p in parts)
+        //    {
+        //        OTSCLRINTERFACE.ImageProForClr imgpro = new OTSCLRINTERFACE.ImageProForClr();
+        //        imgpro.SplitRawParticleIntoGreyScaleParticle(p, new CDoubleRangeClr(ecdrange.GetStart(), ecdrange.GetEnd()), a_pixelSize, a_pImgIn);
+               
+        //        //imgpro.SplitRawParticleIntoWaterShedParticle(p, new CDoubleRangeClr(ecdrange.GetStart(), ecdrange.GetEnd()), a_pixelSize, a_pImgIn);
+        //        var subparts = p.GetSubParticles();
+        //        foreach (var subp in subparts)
+        //        {
+        //            Color cValue = GetRandomColor30();
+        //            foreach (var s in subp.GetFeature().GetSegmentsList())
+        //            {
+
+        //                for (int i = s.GetStart(); i < s.GetStart() + s.GetLength(); i++)
+        //                {
                            
-                            a_pImgOut.SetPixel(i, s.GetHeight(), cValue);
-                        }
-                    }
+        //                    a_pImgOut.SetPixel(i, s.GetHeight(), cValue);
+        //                }
+        //            }
 
 
-                }
+        //        }
                
 
-            }
+        //    }
 
 
 
-            return;
-        }
+        //    return;
+        //}
         public Color GetRandomColor30()
         {
             Random r = new Random();
@@ -492,20 +493,7 @@ namespace OTSModelSharp.ServiceCenter
             
             return true;
         }
-        public bool SplitRawParticleIntoMatrixParticleByXrayStep(COTSParticleClr part,int imageWidth,int imageHeight, double a_pixelSize,double xrayStep)
-        {
-            ImageProForClr imgpro = new ImageProForClr();
-            imgpro.SplitRawParticleIntoMatricsParticle(part,imageWidth,imageHeight, a_pixelSize,xrayStep);
-
-            return true;
-        }
-        public bool SplitRawParticleIntoGreyScaleParticle(COTSParticleClr part,CDoubleRangeClr ecdRange,  double a_pixelSize, CBSEImgClr fieldImage)
-        {
-            ImageProForClr imgpro = new ImageProForClr();
-            imgpro.SplitRawParticleIntoGreyScaleParticle(part,ecdRange, a_pixelSize, fieldImage);
-
-            return true;
-        }
+      
 
 
         public bool RemoveBGAndGetParts(CBSEImgClr img, COTSImageProcParam a_pImgProcessParam,double a_pixelSize,ref List<COTSParticleClr> parts)

+ 2 - 59
OTSIncAMeasureApp/ServiceCenter/EDSController.cs

@@ -10,7 +10,7 @@ using OTSCLRINTERFACE;
 namespace OTSModelSharp.ServiceCenter
 {
     using  OTSCLRINTERFACE;
-    using OTSMeasureApp._0_OTSModel.Measure._5_OTSMining;
+    //using OTSMeasureApp._0_OTSModel.Measure._5_OTSMining;
     using System.Drawing;
     using System.Windows.Forms;
 
@@ -211,64 +211,7 @@ namespace OTSModelSharp.ServiceCenter
             }
             return result;
         }
-        public bool GetXRayBySubParticles(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime)
-        {
-         
-            if (isFEI)
-            {
-                for (int i = 0; i < a_listParticles.Count; i++)
-                {
-                    foreach (var matrixP in a_listParticles[i].GetSubParticles())
-                    {
-                                      
-                        Dictionary<string, double> eleItems = new Dictionary<string, double>();
-                        uint[] spectrumItems = new uint[2000];
-                        Point xrayPos = (Point)matrixP.GetXRayPos();
-                        if (!ApiClass.GetXRayByPoint(xrayPos.X, xrayPos.Y, strResolution, a_nXRayAQTime, AnalyExpCount, false, ref eleItems, ref spectrumItems))
-                        {
-                            continue;
-                        }
-                        CPosXrayClr posxray = new CPosXrayClr();
-                        posxray.SetXrayData(spectrumItems);
-                        posxray.SetPosition(xrayPos);
-                        posxray.SetScanFieldId(matrixP.GetFieldId());
-                        matrixP.SetXray(posxray);
-
-
-                    }
-                  
-                }
-                return true;
-            }
-            else
-            {
-                if (!eds.IsConnected())
-                {
-                    return false;
-                }
-             
-                List<CPosXrayClr> posxrays = new List<CPosXrayClr>();
-                foreach (var rawpart in a_listParticles)
-                {
-                    var parts = rawpart.GetSubParticles();
-                    foreach (var part in parts)
-                    {
-                        var xray = new CPosXrayClr();
-                        xray.SetPosition((Point)part.GetXRayPos());
-                        xray.SetScanFieldId(part.GetFieldId());
-                        posxrays.Add(xray);
-                        part.SetXray(xray);
-                    }
-                  
-                }
-             
-              
-                var xrays = posxrays.ToArray();
-               return  eds.GetXRayByPoints(a_nXRayAQTime,ref xrays,  false);
-
-
-            }
-        }
+      
 
         public bool CollectSpectrum(uint a_nXRayAQTime, ref uint[] a_XrayData)
         {

+ 51 - 144
OTSIncAReportApp/OTSIncAReportApp.csproj

@@ -278,9 +278,6 @@
     <Reference Include="OTS.WinFormsUI.Docking">
       <HintPath>..\Bin\x64\Debug\OTS.WinFormsUI.Docking.dll</HintPath>
     </Reference>
-    <Reference Include="OTSClrInterface">
-      <HintPath>..\Bin\x64\Release_oxford60\OTSClrInterface.dll</HintPath>
-    </Reference>
     <Reference Include="PresentationCore" />
     <Reference Include="SourceGrid, Version=4.40.7083.30975, Culture=neutral, PublicKeyToken=df6f5e538749e85d, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -335,157 +332,107 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="1-UI\Control_Grids\SpectrumExportConfirmation.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Grids\SpectrumExportConfirmation.cs" />
     <Compile Include="1-UI\Control_Grids\SpectrumExportConfirmation.Designer.cs">
       <DependentUpon>SpectrumExportConfirmation.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\ElementSubscript.cs" />
-    <Compile Include="1-UI\frmCharts.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmCharts.cs" />
     <Compile Include="1-UI\frmCharts.Designer.cs">
       <DependentUpon>frmCharts.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\frmMeasureRstMgr.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmMeasureRstMgr.cs" />
     <Compile Include="1-UI\frmMeasureRstMgr.Designer.cs">
       <DependentUpon>frmMeasureRstMgr.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\frmReMeasure.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmReMeasure.cs" />
     <Compile Include="1-UI\frmReMeasure.Designer.cs">
       <DependentUpon>frmReMeasure.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSDisplaySourceGridData\frmReportConditionChoose.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSDisplaySourceGridData\frmReportConditionChoose.cs" />
     <Compile Include="1-UI\OTSDisplaySourceGridData\frmReportConditionChoose.Designer.cs">
       <DependentUpon>frmReportConditionChoose.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\frmMultiSourceSelect.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmMultiSourceSelect.cs" />
     <Compile Include="1-UI\frmMultiSourceSelect.Designer.cs">
       <DependentUpon>frmMultiSourceSelect.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\frmSampleImage.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmSampleImage.cs" />
     <Compile Include="1-UI\frmSampleImage.Designer.cs">
       <DependentUpon>frmSampleImage.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\frmTables.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmTables.cs" />
     <Compile Include="1-UI\frmTables.Designer.cs">
       <DependentUpon>frmTables.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\Control_Graph\OTSIncAReportGraphFuncation\SortParticleDistribution.cs" />
-    <Compile Include="1-UI\Controls\myColorComboBox.cs">
-      <SubType>Component</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\myColorComboBox.cs" />
     <Compile Include="1-UI\Controls\myColorComboBox.Designer.cs">
       <DependentUpon>myColorComboBox.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Grids\ParticlesGridDevidePage.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Grids\ParticlesGridDevidePage.cs" />
     <Compile Include="1-UI\Control_Grids\ParticlesGridDevidePage.Designer.cs">
       <DependentUpon>ParticlesGridDevidePage.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_ECharts\EChart_ParticlesComposition.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_ECharts\EChart_ParticlesComposition.cs" />
     <Compile Include="1-UI\Control_ECharts\EChart_ParticlesComposition.Designer.cs">
       <DependentUpon>EChart_ParticlesComposition.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_ECharts\EChart_Trianglediagram.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_ECharts\EChart_Trianglediagram.cs" />
     <Compile Include="1-UI\Control_ECharts\EChart_Trianglediagram.Designer.cs">
       <DependentUpon>EChart_Trianglediagram.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Graph\Controls\Control_DrawDistrbutionImageAndBSE.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Graph\Controls\Control_DrawDistrbutionImageAndBSE.cs" />
     <Compile Include="1-UI\Control_Graph\Controls\Control_DrawDistrbutionImageAndBSE.designer.cs">
       <DependentUpon>Control_DrawDistrbutionImageAndBSE.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Graph\Controls\Control_DrawDistrbutionSortImage.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Graph\Controls\Control_DrawDistrbutionSortImage.cs" />
     <Compile Include="1-UI\Control_Graph\Controls\Control_DrawDistrbutionSortImage.designer.cs">
       <DependentUpon>Control_DrawDistrbutionSortImage.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Graph\Controls\Control_Ruler.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Graph\Controls\Control_Ruler.cs" />
     <Compile Include="1-UI\Control_Graph\Controls\Control_Ruler.designer.cs">
       <DependentUpon>Control_Ruler.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Graph\Controls\Control_XRayTable.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Graph\Controls\Control_XRayTable.cs" />
     <Compile Include="1-UI\Control_Graph\Controls\Control_XRayTable.designer.cs">
       <DependentUpon>Control_XRayTable.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\Control_Graph\OTSIncAReportGraphFuncation\OTSImageDisHelp.cs" />
-    <Compile Include="1-UI\Controls\OTSGridView.cs">
-      <SubType>Component</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSGridView.cs" />
     <Compile Include="1-UI\Controls\OTSGridView.designer.cs">
       <DependentUpon>OTSGridView.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Grids\CompositionDistributionGrid.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Grids\CompositionDistributionGrid.cs" />
     <Compile Include="1-UI\Control_Grids\CompositionDistributionGrid.designer.cs">
       <DependentUpon>CompositionDistributionGrid.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Grids\ElementCompositionAvgGrid.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Grids\ElementCompositionAvgGrid.cs" />
     <Compile Include="1-UI\Control_Grids\ElementCompositionAvgGrid.designer.cs">
       <DependentUpon>ElementCompositionAvgGrid.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\Control_Grids\OTSIncAReportGridsFuncation\OTSReportGridsFun.cs" />
-    <Compile Include="1-UI\Control_Grids\ParticlesSizeGrid.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Grids\ParticlesSizeGrid.cs" />
     <Compile Include="1-UI\Control_Grids\ParticlesSizeGrid.designer.cs">
       <DependentUpon>ParticlesSizeGrid.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Control_Grids\ResultGrid.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Control_Grids\ResultGrid.cs" />
     <Compile Include="1-UI\Control_Grids\ResultGrid.designer.cs">
       <DependentUpon>ResultGrid.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Frm_UserProgress.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\Frm_UserProgress.cs" />
     <Compile Include="1-UI\Frm_UserProgress.designer.cs">
       <DependentUpon>Frm_UserProgress.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_criterion.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_criterion.cs" />
     <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_criterion.Designer.cs">
       <DependentUpon>OTSReport_criterion.cs</DependentUpon>
     </Compile>
-    <Compile Include="ReportTemplate\GBReport.cs">
-      <SubType>Component</SubType>
-    </Compile>
+    <Compile Include="ReportTemplate\GBReport.cs" />
     <Compile Include="ReportTemplate\GBReport.Designer.cs">
       <DependentUpon>GBReport.cs</DependentUpon>
     </Compile>
-    <Compile Include="ReportTemplate\OTS_DEVReport.cs">
-      <SubType>Component</SubType>
-    </Compile>
+    <Compile Include="ReportTemplate\OTS_DEVReport.cs" />
     <Compile Include="ReportTemplate\OTS_DEVReport.Designer.cs">
       <DependentUpon>OTS_DEVReport.cs</DependentUpon>
     </Compile>
@@ -508,147 +455,103 @@
     <Compile Include="3-ServiceCenter\DataOperation\DataAccess\SqlHelper.cs" />
     <Compile Include="3-ServiceCenter\DataOperation\DataAccess\XMLoperate.cs" />
     <Compile Include="1-UI\OTSDisplaySourceGridData\ChangeGridCellValEvent.cs" />
-    <Compile Include="1-UI\GBCalculate\ASTMStandardABCDDS.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\GBCalculate\ASTMStandardABCDDS.cs" />
     <Compile Include="1-UI\GBCalculate\ASTMStandardABCDDS.designer.cs">
       <DependentUpon>ASTMStandardABCDDS.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\GBCalculate\ChineseStandardABCDDS.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\GBCalculate\ChineseStandardABCDDS.cs" />
     <Compile Include="1-UI\GBCalculate\ChineseStandardABCDDS.designer.cs">
       <DependentUpon>ChineseStandardABCDDS.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\GBCalculate\DINStandardABCDDS.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\GBCalculate\DINStandardABCDDS.cs" />
     <Compile Include="1-UI\GBCalculate\DINStandardABCDDS.designer.cs">
       <DependentUpon>DINStandardABCDDS.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\GBCalculate\NationalStandardMethodTwo.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\GBCalculate\NationalStandardMethodTwo.cs" />
     <Compile Include="1-UI\GBCalculate\NationalStandardMethodTwo.designer.cs">
       <DependentUpon>NationalStandardMethodTwo.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSMgrInfo\FormNewLJFile.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSMgrInfo\FormNewLJFile.cs" />
     <Compile Include="1-UI\OTSMgrInfo\FormNewLJFile.Designer.cs">
       <DependentUpon>FormNewLJFile.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSMgrInfo\frmPartSizeEditorNew.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSMgrInfo\frmPartSizeEditorNew.cs" />
     <Compile Include="1-UI\OTSMgrInfo\frmPartSizeEditorNew.Designer.cs">
       <DependentUpon>frmPartSizeEditorNew.cs</DependentUpon>
     </Compile>
     <Compile Include="2-CommonFunction\OTSDataMgrFunction\ResultDataMgr.cs" />
     <Compile Include="1-UI\OTSDisplaySourceGridData\OTSSourceGrid.cs" />
-    <Compile Include="1-UI\OTSMgrInfo\Triangulation_Edit.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSMgrInfo\Triangulation_Edit.cs" />
     <Compile Include="1-UI\OTSMgrInfo\Triangulation_Edit.Designer.cs">
       <DependentUpon>Triangulation_Edit.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\frmReportApp.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\frmReportApp.cs" />
     <Compile Include="1-UI\frmReportApp.Designer.cs">
       <DependentUpon>frmReportApp.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSMgrInfo\Triangulation_Item.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSMgrInfo\Triangulation_Item.cs" />
     <Compile Include="1-UI\OTSMgrInfo\Triangulation_Item.Designer.cs">
       <DependentUpon>Triangulation_Item.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSMgrInfo\Triangulation_List.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSMgrInfo\Triangulation_List.cs" />
     <Compile Include="1-UI\OTSMgrInfo\Triangulation_List.Designer.cs">
       <DependentUpon>Triangulation_List.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Controls\OTSPeriodicTable\OTSPeriodicTableForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSPeriodicTable\OTSPeriodicTableForm.cs" />
     <Compile Include="1-UI\Controls\OTSPeriodicTable\OTSPeriodicTableForm.Designer.cs">
       <DependentUpon>OTSPeriodicTableForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Controls\OTSPeriodicTable\OTSPeriodicTableForm_Small.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSPeriodicTable\OTSPeriodicTableForm_Small.cs" />
     <Compile Include="1-UI\Controls\OTSPeriodicTable\OTSPeriodicTableForm_Small.Designer.cs">
       <DependentUpon>OTSPeriodicTableForm_Small.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\Controls\OTSPeriodicTable\Periodic.cs" />
-    <Compile Include="1-UI\Controls\OTSPeriodicTable\ThePeriodicTable.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSPeriodicTable\ThePeriodicTable.cs" />
     <Compile Include="1-UI\Controls\OTSPeriodicTable\ThePeriodicTable.designer.cs">
       <DependentUpon>ThePeriodicTable.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Controls\OTSPeriodicTable\ThePeriodicTable_Small.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSPeriodicTable\ThePeriodicTable_Small.cs" />
     <Compile Include="1-UI\Controls\OTSPeriodicTable\ThePeriodicTable_Small.designer.cs">
       <DependentUpon>ThePeriodicTable_Small.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Controls\OTSPeriodicTable\User_Element.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSPeriodicTable\User_Element.cs" />
     <Compile Include="1-UI\Controls\OTSPeriodicTable\User_Element.designer.cs">
       <DependentUpon>User_Element.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\Controls\OTSPeriodicTable\User_Element_Small.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="1-UI\Controls\OTSPeriodicTable\User_Element_Small.cs" />
     <Compile Include="1-UI\Controls\OTSPeriodicTable\User_Element_Small.designer.cs">
       <DependentUpon>User_Element_Small.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\OTSTemplateDesigner\Export_NPOI_Excel.cs" />
     <Compile Include="1-UI\OTSTemplateDesigner\Export_ReportTemplate.cs" />
-    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_Export.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_Export.cs" />
     <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_Export.Designer.cs">
       <DependentUpon>OTSReport_Export.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_GetEChartImage.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_GetEChartImage.cs" />
     <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_GetEChartImage.Designer.cs">
       <DependentUpon>OTSReport_GetEChartImage.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\OTSRibbon\OTSRibbonFun.cs" />
     <Compile Include="1-UI\OTSDisplaySourceGridData\OTSSampleReportInfo\OTSSampleReportInfo.cs" />
-    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_TemplateDesignerRM.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_TemplateDesignerRM.cs" />
     <Compile Include="1-UI\OTSTemplateDesigner\OTSReport_TemplateDesignerRM.Designer.cs">
       <DependentUpon>OTSReport_TemplateDesignerRM.cs</DependentUpon>
     </Compile>
     <Compile Include="1-UI\OTSTreeViewData\OTSTreeViewData.cs" />
-    <Compile Include="1-UI\OutputNlog.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OutputNlog.cs" />
     <Compile Include="1-UI\OutputNlog.Designer.cs">
       <DependentUpon>OutputNlog.cs</DependentUpon>
     </Compile>
     <Compile Include="3-ServiceCenter\HardwareController.cs" />
     <Compile Include="1-UI\Control_Graph\Controls\OutPIC.cs" />
-    <Compile Include="Help.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Help.cs" />
     <Compile Include="Help.Designer.cs">
       <DependentUpon>Help.cs</DependentUpon>
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="1-UI\OTSMgrInfo\frmReportSysConfig.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-UI\OTSMgrInfo\frmReportSysConfig.cs" />
     <Compile Include="1-UI\OTSMgrInfo\frmReportSysConfig.Designer.cs">
       <DependentUpon>frmReportSysConfig.cs</DependentUpon>
     </Compile>
@@ -1478,6 +1381,10 @@
       <Project>{3b7695aa-8231-45ac-b493-84390a945d02}</Project>
       <Name>OTSCommon</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OTSCPP\OTSClrInterface\OTSClrInterface.vcxproj">
+      <Project>{490a8592-7b13-4536-b475-028e73007fae}</Project>
+      <Name>OTSClrInterface</Name>
+    </ProjectReference>
     <ProjectReference Include="..\OTSIncAMeasureApp\OTSIncAMeasureApp.csproj">
       <Project>{474772dc-334a-4e87-bb46-3abd913aa44a}</Project>
       <Name>OTSIncAMeasureApp</Name>