소스 검색

clear some useless comments and forbid the delayQuant feature in bruker code.

gsp 1 년 전
부모
커밋
aa4097f758

+ 2 - 2
Bin/x64/Debug/Config/ProData/HardwareConfig.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XMLData PathName="HardwareConfig.xml" ID="1">
-  <Member RegName="SemControllerName" Value="Bruker" ImageInputSources="SE" />
-  <Member RegName="EDSName" Value="Bruker" DelayQuantify="true" />
+  <Member RegName="SemControllerName" Value="ZEISS" ImageInputSources="SE" />
+  <Member RegName="EDSName" Value="Bruker" DelayQuantify="false" />
   <Member RegName="BrukerDllVersion" Version="Bruker.API.Esprit64.dll" />
   <Member RegName="FEIIP" Value="192.168.0.1" />
   <Member RegName="FEIPORT" Value="7520" />

+ 1 - 1
Bin/x64/Debug/Config/ReportTemplate/SummaryInfo.xml

@@ -1,6 +1,6 @@
 <XmlConfig>
   <M_address>
     <Path>ReportTemplateConfig.xml</Path>
-    <Path_CA>ReportTemplateConfig.xml</Path_CA>
+    <Path_CA>ReportTemplateConfig - 副本.xml</Path_CA>
   </M_address>
 </XmlConfig>

+ 2 - 2
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.cpp

@@ -52,7 +52,7 @@ namespace OTSController {
 	{
 	
 	
-		//m_bInit is the dll loading flag,so there's no need to free it manually , it'll be release when the the whole process is  complete.(gsp)
+		//m_bInit is the dll loading flag,so there's no need to free it manually , it'll be released when  the whole process  finish.(gsp)
 		if (!m_bInit)
 		{
 			// calculate Bruker client dll name
@@ -78,7 +78,7 @@ namespace OTSController {
 				
 				return false;
 			}
-			SetDllDirectory(NULL);// recover the default search path.
+			SetDllDirectory(NULL);// restore the default search path.
 			
 		}
 

+ 0 - 3
OTSCPP/OTSControl/Bruker/OTSScanBrucker.h

@@ -4,9 +4,6 @@
 
 namespace OTSController {
 
-	// Bruker Image Acquisition Device
-
-	
 	class __declspec(dllexport) COTSScanBrucker :public COTSScanBase
 	{
 	public:

+ 2 - 10
OTSCPP/OTSControl/Simulate/OTSEDSSim.cpp

@@ -60,10 +60,7 @@ namespace OTSController {
 
 
 			CString strPathName = _T(".\\");
-			/*if (strPathName.Right(1) != _T('.\\'))
-			{
-				strPathName +=
-			}*/
+
 			return strPathName;
 		}
 		// Determines whether is digit string.
@@ -160,7 +157,7 @@ namespace OTSController {
 		memset(m_nRayData, 0, sizeof(DWORD) * (long)EDSConst::XANA_CHANNELS);
 		if (!CollectASpectrumFromTxtFile(m_nRayData, (DWORD)EDSConst::XANA_CHANNELS))
 		{
-			// failed to call CollectASpectrumFromTxtFile method
+
 			LogTrace(__FILE__, __LINE__, _T("COTSEDSSim::CollectSpectrum: failed to call CollectASpectrumFromTxtFile method."));
 		}
 
@@ -179,9 +176,6 @@ namespace OTSController {
 			return _T("");
 		}
 
-		// company system data pathname
-		// e.g. "c:\ProgramData\Config\"
-		//CString strCmpSysDataPath = strCommonDataPathName + STR_COMPANYNAME + _T("\\") + STR_SYSTEM_DATA + _T("\\");
 
 		CString strCmpSysDataPath = strCommonDataPathName + STR_COMPANYNAME + _T("\\") + STR_SIMULATE_DATA + _T("\\");
 
@@ -310,9 +304,7 @@ namespace OTSController {
 			{
 				eleList.push_back(pXrayPoi->GetElementQuantifyData()[i]->GetName());
 			}
-			//bool isFilter = CPeak::FindPeaks(m_nRayData, eleList);
 
-			//bool isFilter = true;
 
 			pXrayPoi->SetXrayData(m_nRayData);
 

+ 1 - 7
OTSCPP/OTSControl/Simulate/OTSEDSSim.h

@@ -1,5 +1,5 @@
 #pragma once
-//#include "../Bruker/OTSBrukerImpl.h"
+
 #include "../OTSEDSBase.h"
 #include "../SEMCommonConst.h"
 
@@ -19,10 +19,6 @@ namespace OTSController {
 		// initialization method
 		virtual BOOL Init() override;
 
-		// To show whether the detector can collect a set of x-Ray one go
-		//virtual BOOL IsSupportSetCollection() override { return true; }
-
-
 		
 		// collect spectrum data
 		virtual BOOL CollectSpectrum(DWORD a_nMilliseconds) override;
@@ -72,8 +68,6 @@ namespace OTSController {
 		// get x-ray point collection limit
 		virtual long GetMaxPointLimit(void) override { return (long)EDSConst::MAX_XRAY_BATCH; }
 
-		// quantification only works for bruker controller now
-		//virtual BOOL IsSupportQuantification() override;
 		virtual BOOL GetQuantificationMethods(std::vector<CString>& a_vMethods) override;
 		virtual BOOL QuantifyXrayPoint(CPosXray* a_pXRayPoint, LPCTSTR a_sMethodName) override;
 		virtual BOOL QuantifySpectrumFile(LPCTSTR a_sFilePathName, LPCTSTR a_sMethodName, CElementChemistriesList& a_listElementChemistry) override;

+ 15 - 90
OTSCPP/OTSControl/Simulate/OTSScanSim.cpp

@@ -3,11 +3,10 @@
 #include "otsdataconst.h"
 
 namespace OTSController {
-	//private method
+	
 	namespace
 	{
-		// get system common data folder pathname
-		// return "" if failed
+	
 		CString GetOSCommonDataPathName()
 		{
 
@@ -15,22 +14,22 @@ namespace OTSController {
 
 			return strPathName;
 		}
-		// get company system data path
+		
 		CString GetCompanySysDataPathName()
 		{
-			// get common data pathname string
+			
 			CString strCommonDataPathName = GetOSCommonDataPathName();
 			if (strCommonDataPathName.IsEmpty())
 			{
-				// failed to get common data pathname string
+			
 				LogErrorTrace(__FILE__, __LINE__, _T("GetOTSPackSysDataPathName: failed to common data pathname string."));
 				return _T("");
 			}
 
-			// company system data pathname
+			
 			CString strCmpSysDataPath = strCommonDataPathName + STR_COMPANYNAME + _T("\\");
 
-			// return company system data pathname 
+			
 			return strCmpSysDataPath;
 		}
 		
@@ -51,39 +50,34 @@ namespace OTSController {
 	{
 	}
 
-	// initialization
+	
 	BOOL COTSScanSim::Init()
 	{
 
-		// ok, return TRUE
+		
 		return TRUE;
 	}
 
-	// get the size of matrix.
-	//CSize COTSScanSim::GetMatrixSize(int /*a_nMatrixIndex*/)
-	//{
-
-	//	return CSize(0);
-	//}
+	
 
 	// acquire BSE image
 	CBSEImgPtr COTSScanSim::AcquireBSEImage()
 	{
-		// BSE image
+		
 		CBSEImgPtr poBSEImgPtr = nullptr;
 		
-		// load simulation image
+	
 		poBSEImgPtr = AcquireBSEImageFromBitmapFile();
 
-		// check simulation image
+		
 		ASSERT(poBSEImgPtr);
 		if (!poBSEImgPtr)
 		{
-			// failed to load simulation image
+		
 			LogErrorTrace(__FILE__, __LINE__, _T("COTSScanSim::AcquireBSEImage: failed to load simulation image"));
 		}
 		Sleep(1000);//simulate the real sem time delay.
-		// return simulation image, nullptr if load simulation image failed
+	
 		return poBSEImgPtr;		
 	}
 	// get image from a file
@@ -134,8 +128,6 @@ namespace OTSController {
 			CRect imageRect(0, 0, width, height);
 			bseImage = CBSEImgPtr(new CBSEImg(imageRect));
 
-
-			/*bseImage->SetImageRect(imageRect);*/
 			bseImage->InitImageData(width, height);
 			BYTE* pImageData = bseImage->GetImageDataPointer();
 
@@ -167,11 +159,6 @@ namespace OTSController {
 		return FALSE;
 	}
 
-	// start scan table
-	//BOOL COTSScanSim::StartScanTable(int /*a_nMatrixIndex*/, unsigned int /*nP*/, int* /*px*/, int* /*py*/)
-	//{
-	//	return TRUE;
-	//}
 
 	// set image size
 	BOOL COTSScanSim::SetImageSize(long a_nImageSizeX,long nHeight)
@@ -188,66 +175,4 @@ namespace OTSController {
 		return TRUE;
 	}
 
-
-
-	// get dwell time by index
-	//long COTSScanSim::GetDwellTimeByIndex(const long a_nIndex)
-	//{
-	//	// check index
-	//	if (a_nIndex < DWELLTIME_BRUKER_ID_MIN || a_nIndex > DWELLTIME_BRUKER_ID_MAX)
-	//	{
-	//		// invalid index
-	//		ASSERT(FALSE);
-	//		LogInfoTrace(__FILE__, __LINE__, _T("COTSScanSim::GetDwellTimeByIndex: invalid index"));
-	//		return -1;
-	//	}
-
-	//	// get dwell time by index
-	//	long nDwellTime = DWELLTIME_BRUKER_VALUES[a_nIndex];
-	//	return nDwellTime;
-	//}
-
-	// set dwell time by index
-	//BOOL COTSScanSim::SetDwellTimeByIndex(const long a_nIndex)
-	//{
-	//	// check index
-	//	if (a_nIndex < DWELLTIME_BRUKER_ID_MIN || a_nIndex > DWELLTIME_BRUKER_ID_MIN)
-	//	{
-	//		// invalid index
-	//		ASSERT(FALSE);
-	//		LogInfoTrace(__FILE__, __LINE__, _T("COTSScanSim::SetDwellTimeByIndex: invalid index"));
-	//		return FALSE;
-	//	}
-
-	//	// get dwell time 
-	//	long nDwellTime = DWELLTIME_BRUKER_VALUES[a_nIndex];
-	//	if (!SetDwellTime(nDwellTime))
-	//	{
-	//		// failed to call SetDwellTime method
-	//		LogErrorTrace(__FILE__, __LINE__, _T("COTSScanSim::SetDwellTimeByIndex: failed to call SetDwellTime method."));
-	//		return FALSE;
-	//	}
-
-	//	// ok, return TRUE
-	//	return TRUE;
-	//}
-
-
-
-
-	// scan field size
-	/*BOOL COTSScanSim::SetScanFieldSize(const int a_nWidth, const int a_nHeight)
-	{
-		m_nScanFieldSizeX = a_nWidth;
-		m_nScanFieldSizeY = a_nHeight;
-		return TRUE;
-	}*/
-
-	// set the SEM position
-	/*BOOL COTSScanSim::SetEMPosition(const int a_nPosX, const int a_nPosY)
-	{
-		m_nCurrentBSEPositionX = a_nPosX;
-		m_nCurrentBSEPositionY = a_nPosY;
-		return TRUE;
-	}*/
 }

+ 3 - 19
OTSCPP/OTSControl/Simulate/OTSScanSim.h

@@ -14,22 +14,14 @@ namespace OTSController {
 		// initialization
 		virtual BOOL Init() override;
 
-		/// instance termination
-		//void FinishedInstance() override;
 
 		virtual ScanController::SCANNER_ID GetType() override { return ScanController::SCANNER_ID::OFFLINE; }
 
 	public:
-		// Get matrix Size
-		//virtual CSize GetMatrixSize(int a_nMatrixIndex) override;
+
 		// move beam to point
 		virtual BOOL MoveBeamTo(CPoint& a_beamPos) override;
-		// Set and Start Scan
-		//virtual BOOL SetAndStartScan(void) override { return true; }
-		// Set point Scan
-		//virtual BOOL SetPointScan(int /*a_nMatrixIndex*/) override { return true; }
-		// Start Scan Table
-		//virtual BOOL StartScanTable(int a_nMatrixIndex, unsigned int nP, int* pnx, int* pny) override;
+
 		// set Image Size
 		virtual BOOL SetImageSize(long nImageSize,long nHeight) override;
 		/// set dwell time
@@ -41,15 +33,7 @@ namespace OTSController {
 		
 
 	
-	/*	virtual long GetDwellTimeByIndex(const long a_nIndex) override;
-		virtual BOOL SetDwellTimeByIndex(const long a_nIndex) override;*/
-
-
-		// scan field size
-		//virtual BOOL SetScanFieldSize(const int a_nWidth, const int a_nHeight) override;
-		
-		// set the SEM position
-		//virtual BOOL SetEMPosition(const int a_nPosX, const int a_nPosY) override;
+	
 	private:
 		CBSEImgPtr AcquireBSEImageFromBitmapFile();
 		const CSize RESOLUTION_VALUE[RESOLUTION_ID_MAX + 1] = { CSize(64, 48), CSize(128, 96), CSize(256, 192), CSize(512, 384),

+ 1 - 3
OTSCPP/OTSControl/Simulate/OTSSemSim.h

@@ -73,15 +73,13 @@ namespace OTSController {
 		{
 			m_dCurrentPositionX = a_dPositionX;
 			m_dCurrentPositionY = a_dPositionY;
-			/*m_dCurrentPositionR = a_dRotation;*/
+			
 
 			return TRUE;
 		}
 		virtual BOOL GetSpotSize(double& a_dSpotSize) override { a_dSpotSize = m_dSpotSize; return TRUE; }
 		virtual BOOL SetSpotSize(double a_dSpotSize) override { m_dSpotSize = a_dSpotSize; return TRUE; }
 
-		/*virtual BOOL GetScanMode(long& a_nScanMode) override { a_nScanMode = m_nScanMode; return TRUE; }
-		virtual BOOL SetScanMode(long a_nScanMode) override { m_nScanMode = a_nScanMode; return TRUE; }*/
 		virtual BOOL SetScanExternal(BOOL a_bExternal) override { m_nScanMode = (a_bExternal ? 1 : 0); return TRUE; }
 
 		inline virtual int GetExternalMode() override { return 1; };

+ 36 - 49
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -53,8 +53,7 @@ namespace OTSMeasureApp
 
         #region 全部变量
         public OTSIncAMeasureAppForm m_MeasureAppForm;
-        /* 接收图像数据 */
-        //public byte[] Imagedata = new byte[m_iWidth];
+      
 
         static int m_iWidth = 0;
         static int m_iHeight = 0;
@@ -154,16 +153,6 @@ namespace OTSMeasureApp
 
             m_ElementPointGDIObjects = new List<CRectangleGDIObject>();
 
-
-            //if (OTSCommon.Language.ReadDefaultLanguage() == "ZH")
-            //{
-            //    contextMenuStrip1.Items[(int)MeasureStateMenuType.ChangeDiffImageShow].Text = "显示至BSE原图";
-            //}
-            //else
-            //{
-            //    contextMenuStrip1.Items[(int)MeasureStateMenuType.ChangeDiffImageShow].Text = "SwitchDisplayToBSEDiagram";
-            //}
-
             //进入时首先对XRayTable进行隐藏
             panelXray.Visible = false;
             //国际化
@@ -1431,7 +1420,7 @@ namespace OTSMeasureApp
             var expC = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().GetAnalyExpCount();
 
             IEDSController m_EDSHardwareMgr = EDSController.GetEDSController(m_iWidth, m_iHeight, expC);
-            //SemController m_SEMHardwareMgr = SemController.GetSEMController();
+          
             //1.连接电镜
             if (m_EDSHardwareMgr.Connect())
             {
@@ -1462,10 +1451,8 @@ namespace OTSMeasureApp
                     string a_strElementName = "";
                     //元素Xray数据
                     uint[] a_ElementXrayData = new uint[2000];
-                    //设置分辨率
-                    //m_EDSHardwareMgr.SetResolution(m_iWidth, m_iHeight);
-                    //设置期望计数率
-                    //m_EDSHardwareMgr.SetAnalyExpCount();
+
+
                     if (GetXRayAndElements(a_Milliseconds, (int)dMouseImgX, (int)dMouseImgY, ref a_ElementXrayData, ref a_nElementNum, ref a_strElementName))
                     {
                         log.Trace("--获取单点扫描数据:元素数量:'" + a_nElementNum + "' ,元素名称:'" + a_strElementName + "'--");
@@ -1831,44 +1818,44 @@ namespace OTSMeasureApp
             }
         }
 
-        private void button1_Click(object sender, EventArgs e)
-        {
-            COTSSample cSample = m_MeasureAppForm.m_ProjParam.GetWorkSample();
-            int start = cSample.GetMsrParams().GetImageProcessParam().GetBGGray().GetStart();
-            int end = cSample.GetMsrParams().GetImageProcessParam().GetBGGray().GetEnd();
-            Image bInput = picBox.Image;
-            List<ColorMap> colorMapTemp = new List<ColorMap>();
-            for (int i = start; i <= end; i++)
-            {
-                ColorMap colorMap = new ColorMap();
-                string colorName = "#" + Color.FromArgb(i, i, i).Name.ToString();
-                colorMap.OldColor = ColorTranslator.FromHtml(colorName);
-                colorMap.NewColor = Color.Red;
-                colorMapTemp.Add(colorMap);
-            }
-            Bitmap outBitmap = new Bitmap(bInput);
-            //创建Graphics对象
-            Graphics g = Graphics.FromImage(outBitmap);
-            //生成的图像大小
-            int width = bInput.Width;
-            int height = bInput.Height;
-            //编辑被着急图像所要显示的位置
-            Rectangle DrawRect = new Rectangle(0, 0, 1024, 768);
-            //编辑输出画布中着色的位置
-            Rectangle ShowRect = new Rectangle(0, 0, 1024, 768);
-            ImageAttributes attr = new ImageAttributes();
-            attr.SetRemapTable(colorMapTemp.ToArray());
-            //从输入图像中截图至临时图像中
-            g.DrawImage(bInput, ShowRect, 0, 0, DrawRect.Width, DrawRect.Height, GraphicsUnit.Pixel, attr);
-            picBox.Image = outBitmap;
-        }
+        //private void button1_Click(object sender, EventArgs e)
+        //{
+        //    COTSSample cSample = m_MeasureAppForm.m_ProjParam.GetWorkSample();
+        //    int start = cSample.GetMsrParams().GetImageProcessParam().GetBGGray().GetStart();
+        //    int end = cSample.GetMsrParams().GetImageProcessParam().GetBGGray().GetEnd();
+        //    Image bInput = picBox.Image;
+        //    List<ColorMap> colorMapTemp = new List<ColorMap>();
+        //    for (int i = start; i <= end; i++)
+        //    {
+        //        ColorMap colorMap = new ColorMap();
+        //        string colorName = "#" + Color.FromArgb(i, i, i).Name.ToString();
+        //        colorMap.OldColor = ColorTranslator.FromHtml(colorName);
+        //        colorMap.NewColor = Color.Red;
+        //        colorMapTemp.Add(colorMap);
+        //    }
+        //    Bitmap outBitmap = new Bitmap(bInput);
+        //    //创建Graphics对象
+        //    Graphics g = Graphics.FromImage(outBitmap);
+        //    //生成的图像大小
+        //    int width = bInput.Width;
+        //    int height = bInput.Height;
+        //    //编辑被着急图像所要显示的位置
+        //    Rectangle DrawRect = new Rectangle(0, 0, 1024, 768);
+        //    //编辑输出画布中着色的位置
+        //    Rectangle ShowRect = new Rectangle(0, 0, 1024, 768);
+        //    ImageAttributes attr = new ImageAttributes();
+        //    attr.SetRemapTable(colorMapTemp.ToArray());
+        //    //从输入图像中截图至临时图像中
+        //    g.DrawImage(bInput, ShowRect, 0, 0, DrawRect.Width, DrawRect.Height, GraphicsUnit.Pixel, attr);
+        //    picBox.Image = outBitmap;
+        //}
 
         private void OTSMeasureStatusWindow_MouseClick(object sender, MouseEventArgs e)
         {
            
                 if (e.Button == MouseButtons.Right && e.Clicks == 1)
                 {
-                    //contextMenuStrip1.Show();
+                   
                     contextMenuStrip1.Show(PointToScreen(e.Location));
                     SetContentMenu();
                 }

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

@@ -39,7 +39,8 @@ namespace OTSModelSharp.ServiceCenter
                 else if (deviceType == "Bruker")
                 {
                     var ctrl = new EDSController("Bruker",expectCount);
-                    var delayQuant = Convert.ToBoolean(FileHelper.GetIfDelayQuantify());
+                    //var delayQuant = Convert.ToBoolean(FileHelper.GetIfDelayQuantify());
+                   var delayQuant = false;//Now it has proved that this method won't increase the speed of xray analysis.So deactivate it here.
                     ctrl.delayQuant = delayQuant;
                     edsctrl = ctrl;
 

+ 1 - 1
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/ScanController.cs

@@ -1,6 +1,6 @@
 
 using FEIApiControl;
-//using OINA.Extender.Data.Image;
+
 using OTSCLRINTERFACE;
 
 using OTSDataType;

+ 1 - 4
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/SemController.cs

@@ -52,10 +52,7 @@ namespace OTSModelSharp.ServiceCenter
         public bool Connect()
         {
   
-                //if (!hw.Init())
-                //{
-                //    return false;
-                //}
+               
                 if (hw.IsConnected())
                 {
                     return true;

+ 2 - 2
OTSIncAMeasureApp/ServiceCenter/OxfordExtender/OxfordSemController.cs

@@ -125,14 +125,14 @@ namespace OTSMeasureApp.ServiceCenter
         {
            var b1= iExtender.MoveStageXY((float)a_dPositionX, (float)a_dPositionY);
             var b2=iExtender.SetStageGotoR((float)rotation);
-            //Thread.Sleep(500);
+           
             return b1&b2;
         }
 
         public bool MoveSEMToPoint(double a_dPositionX, double a_dPositionY)
         {
             var b= iExtender.MoveStageXY((float)a_dPositionX, (float)a_dPositionY);
-            //Thread.Sleep(500);
+          
             return b;
         }
 

+ 1 - 4
OxfordExtenderWrapper/ExtenderWrapper.cs

@@ -408,10 +408,7 @@ namespace OxfordExtenderWrapper
         }
         public bool MoveStageXY(float x, float y)
         {
-            //if ((m_dStageX - x < 0.001) && (m_dStageY - y < 0.001))
-            //{
-            //    return true;
-            //}
+          
             currentCommand.moveStagePrm = new MoveStageParam();
             currentCommand.moveStagePrm.x = x;
             currentCommand.moveStagePrm.y = y;