Prechádzať zdrojové kódy

Merge branch 'Release2.4' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into zty

zty 3 rokov pred
rodič
commit
8e872b3d3c

+ 8 - 5
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.cpp

@@ -3017,13 +3017,19 @@ BOOL COTSBrukerImpl::SetXRayPoints(CPosXraysList& a_listXrayPois, const DWORD a_
 			return FALSE;
 		}
 
-		std::vector<double> peakList;
+		// set spectrum data for the x-ray point
+		a_listXrayPois[i]->SetXrayData(nChannelData);
+
 		std::vector<CString> eleList;
 		for (size_t i = 0; i < a_listXrayPois[i]->GetElementQuantifyData().size(); i++)
 		{
 			eleList.push_back(a_listXrayPois[i]->GetElementQuantifyData()[i]->GetName());
 		}
-		bool isFilter = COTSImageProcess::FindPeaks(nChannelData, peakList, eleList);
+		bool isFilter = true;
+		if (eleList.size() != 0)
+		{
+			isFilter = COTSImageProcess::FindPeaks(nChannelData, eleList);
+		}
 
 		if (m_bDoQuantification && isFilter)
 		{
@@ -3047,9 +3053,6 @@ BOOL COTSBrukerImpl::SetXRayPoints(CPosXraysList& a_listXrayPois, const DWORD a_
 			CElementChemistriesList listElement;
 			a_listXrayPois[i]->SetElementQuantifyData(listElement);
 		}
-
-		// set spectrum data for the x-ray point
-		a_listXrayPois[i]->SetXrayData(nChannelData);
 	}
 
 	// We have seen rare instances where StartPointListMeasurement returns some unexpected empty

+ 9 - 9
OTSCPP/OTSControl/Simulate/OTSEDSSim.cpp

@@ -141,15 +141,16 @@ namespace OTSController {
 
 		for (auto pXrayPoi : a_vXRayPoints)
 		{
-			//std::vector<double> peakList;
-			//std::vector<CString> eleList;
-			//for (size_t i = 0; i < pXrayPoi->GetElementQuantifyData().size(); i++)
-			//{
-			//	eleList.push_back(pXrayPoi->GetElementQuantifyData()[i]->GetName());
-			//}
-			//bool isFilter = COTSImageProcess::FindPeaks(m_nRayData, peakList, eleList);
-
+			std::vector<CString> eleList;
+			for (size_t i = 0; i < pXrayPoi->GetElementQuantifyData().size(); i++)
+			{
+				eleList.push_back(pXrayPoi->GetElementQuantifyData()[i]->GetName());
+			}
 			bool isFilter = true;
+			if (eleList.size() != 0)
+			{
+				isFilter = COTSImageProcess::FindPeaks(m_nRayData, eleList);
+			}
 
 			pXrayPoi->SetXrayData(m_nRayData);
 
@@ -225,7 +226,6 @@ namespace OTSController {
 
 			}
 		}
-
 	
 		Sleep(500);
 		// always return TRUE

+ 2 - 2
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -2761,7 +2761,7 @@ namespace OTSIMGPROC
 		return true;
 	}
 	
-	BOOL COTSImageProcess::FindPeaks(DWORD* nChannelData, vector<double>& peakList, vector<CString>& eleList)
+	BOOL COTSImageProcess::FindPeaks(DWORD* nChannelData, vector<CString>& eleList)
 	{
 		//»ñÈ¡Peaks
 		DWORD m_nXrayData[GENERALXRAYCHANNELS];
@@ -2778,7 +2778,7 @@ namespace OTSIMGPROC
 		vector<CString> nameList;
 		for (size_t i = 0; i < GENERALXRAYCHANNELS; i++)
 		{
-			if (tVector[i].second > countMap * 0.002)
+			if (tVector[i].second > countMap * 0.003)
 			{
 				std::vector<CString> vecstr;
 				CElement::GetAllElementsEnergyK((float)tVector[i].first / 100, 0.1f, vecstr);

+ 1 - 1
OTSCPP/OTSImagePro/OTSImageProcess.h

@@ -72,7 +72,7 @@ namespace OTSIMGPROC {
 		static void RemoveBackGround(CBSEImgPtr a_pImgIn, COTSImageProcessParamPtr a_pImageProcessParam, CBSEImgPtr a_pImgOut,long& foundedPixelNum);
 		static BOOL CalcuParticleImagePropertes(COTSParticlePtr part, double a_PixelSize);
 		static int SplitCString(const CString& str, const char* separator, int sep_number, vector<CString>& strArray);
-		static BOOL FindPeaks(DWORD* nChannelData, vector<double>& peakList, vector<CString>& eleList);
+		static BOOL FindPeaks(DWORD* nChannelData, vector<CString>& eleList);
 		static void sortMapByValue(map<int, int>& tMap, vector<pair<int, int>>& tVector);
 
 		static BOOL MergeBigBoundaryParticles(COTSFieldDataList allFields, double pixelSize, int scanFieldSize, CSize ResolutionSize, COTSParticleList& mergedParts);

+ 11 - 11
OTSIncAMeasureApp/Program.cs

@@ -12,17 +12,17 @@ namespace OTSMeasureApp
         [STAThread]
         static void Main()
         {
-            if (!System.Diagnostics.Debugger.IsAttached)
-            {
-                //判断是否有授权
-                var reg = new CRegistration();
-                if (!reg.RegistrationVerification())
-                {
-                    MessageBox.Show("Error: missing authorization");
-                    System.Environment.Exit(0);
-                    return;
-                }
-            }
+            //if (!System.Diagnostics.Debugger.IsAttached)
+            //{
+            //    //判断是否有授权
+            //    var reg = new CRegistration();
+            //    if (!reg.RegistrationVerification())
+            //    {
+            //        MessageBox.Show("Error: missing authorization");
+            //        System.Environment.Exit(0);
+            //        return;
+            //    }
+            //}
             
             //--------------------------只运行一个测量程序--------------------------------