|
|
@@ -49,7 +49,7 @@ bool ParticleClassifyEngine::Classify(COTSParticlePtr particle, CPosXrayPtr xray
|
|
|
|
|
|
auto& originalPartEles = xray->GetElementQuantifyData();//find all the elements containing in the particle xray.
|
|
|
//以下为调试用代码段(在log中打出颗粒元素),不要删除----------
|
|
|
- /*std::string allele="";
|
|
|
+ /*std::string allele=std::to_string(particle->GetTagId()) + " ";
|
|
|
for (auto che : originalPartEles)
|
|
|
{
|
|
|
allele += che->GetName().GetBuffer() ;
|
|
|
@@ -72,16 +72,17 @@ bool ParticleClassifyEngine::Classify(COTSParticlePtr particle, CPosXrayPtr xray
|
|
|
|
|
|
|
|
|
PartSTDItemList stdItems = m_std->GetSTDItems();
|
|
|
-
|
|
|
+ //以下为调试用代码段(在log中打出颗粒元素),不要删除----------
|
|
|
+ /*CString stdnum = _T("STDNum ")+ CString(std::to_string(stdItems.size()).c_str());
|
|
|
+ LogTrace(__FILE__, __LINE__, stdnum);*/
|
|
|
for (auto itm : stdItems)
|
|
|
{
|
|
|
std::string exp = itm->GetExpressionStr();
|
|
|
-
|
|
|
+ //LogTrace(__FILE__, __LINE__, exp.c_str());
|
|
|
//if the element quantity is not match the std item's keyelement num than is unsatisfied.
|
|
|
if (partEles.size() < itm->GetKeyElementList().size())
|
|
|
{
|
|
|
- /*std::string s = std::to_string(partEles.size()) + ":" + std::to_string(itm->GetKeyElementList().size());
|
|
|
- LogTrace(__FILE__, __LINE__, s.c_str());*///调试用代码段
|
|
|
+
|
|
|
particle->SetClassifyId(9);
|
|
|
particle->TypeName("Not Identified");
|
|
|
|
|
|
@@ -171,11 +172,23 @@ bool ParticleClassifyEngine::Classify(COTSParticlePtr particle, CPosXrayPtr xray
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- //LogInfoTrace(__FILE__, __LINE__, exp.c_str());//调试用代码段
|
|
|
+
|
|
|
|
|
|
//calculate the expression which has been processed.
|
|
|
-
|
|
|
+
|
|
|
bool rst = CalcuExp(exp);
|
|
|
+
|
|
|
+ //以下为调试用代码段(在log中打出颗粒元素),不要删除----------
|
|
|
+ /*LogTrace(__FILE__, __LINE__, exp.c_str());
|
|
|
+ if (rst)
|
|
|
+ {
|
|
|
+ LogTrace(__FILE__, __LINE__, CString("true"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ LogTrace(__FILE__, __LINE__, CString("false"));
|
|
|
+ }*/
|
|
|
+
|
|
|
if (rst)
|
|
|
{
|
|
|
//int id = itm->GetID();
|