|
@@ -32,26 +32,26 @@ namespace OTSModelSharp
|
|
|
CFieldDataClean curFldDataMgr = new CFieldDataClean( a_BSEImg,m_Sample.CalculatePixelSize());
|
|
|
curFldDataMgr.SetId(nNewFieldId);
|
|
|
curFldDataMgr.SetPosition(fldCenter);
|
|
|
- if (!GetOriginalParticles())
|
|
|
- {
|
|
|
- StartSaveFileThread(curFldDataMgr);
|
|
|
- loger.Error("ImageProcess: failed to find any particles.");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ GetOriginalParticles();
|
|
|
+ //{
|
|
|
+ // StartSaveFileThread(curFldDataMgr);
|
|
|
+ // loger.Error("ImageProcess: failed to find any particles.");
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
// second step :filter the finded particles.
|
|
|
- if (!FilterParticles(curFldDataMgr))
|
|
|
- {
|
|
|
- StartSaveFileThread(curFldDataMgr);
|
|
|
- loger.Info("ImageProcess: there is no particles to be analyzed.");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ FilterParticles(curFldDataMgr);
|
|
|
+ //{
|
|
|
+ // StartSaveFileThread(curFldDataMgr);
|
|
|
+ // loger.Info("ImageProcess: there is no particles to be analyzed.");
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
//collect xray data.
|
|
|
- if (!CollectParticlesXrayData(curFldDataMgr))
|
|
|
- {
|
|
|
- StartSaveFileThread(curFldDataMgr);
|
|
|
- loger.Info("ImageProcess: there is no particles to be analyzed.");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ CollectParticlesXrayData(curFldDataMgr);
|
|
|
+ //{
|
|
|
+ // StartSaveFileThread(curFldDataMgr);
|
|
|
+ // loger.Info("ImageProcess: there is no particles to be analyzed.");
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
|
|
|
//special treatment.
|
|
|
//ParticleSpecialTreatment();
|
|
@@ -120,7 +120,7 @@ namespace OTSModelSharp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public bool FilterParticles(CFieldDataClean fld)
|
|
|
+ public void FilterParticles(CFieldDataClean fld)
|
|
|
{
|
|
|
// 1)remove over sized particles, too small particles and get a analysis particles list
|
|
|
|
|
@@ -134,7 +134,7 @@ namespace OTSModelSharp
|
|
|
curFldData.FilterParticles(pImgProcessParam, dPixelSize);
|
|
|
if (curFldData.NoAnalysisParticle())
|
|
|
{
|
|
|
- return false;
|
|
|
+ loger.Warn("There's no analysis particles!");
|
|
|
}
|
|
|
//2) according to the quantify threshold size value saperate the analysis particles into two group :the bigparticles and the smallparticles.
|
|
|
|
|
@@ -195,10 +195,10 @@ namespace OTSModelSharp
|
|
|
loger.Info("SmallQuantifyParts: " + smallparts.Count);
|
|
|
loger.Info("BigQuantifyParts: " + bigparts.Count);
|
|
|
|
|
|
- return true;
|
|
|
+ return ;
|
|
|
}
|
|
|
|
|
|
- public bool CollectParticlesXrayData(CFieldDataClean fld)
|
|
|
+ public void CollectParticlesXrayData(CFieldDataClean fld)
|
|
|
{
|
|
|
// get x-ray parameters
|
|
|
COTSXRayParam pXRayParam = m_Sample.GetMsrParams ().GetXRayParam();
|
|
@@ -222,13 +222,13 @@ namespace OTSModelSharp
|
|
|
|
|
|
// get x-ray list (analysis) by particle features
|
|
|
nXRayAQTime = (uint)pXRayParam.GetMidAnalyAQTime();
|
|
|
- if (!m_EDSHardwareMgr.GetXRayByFeatures(bigparts, nXRayAQTime, true))
|
|
|
- {
|
|
|
- loger.Error("ImageProcess: call GetXRayByFeatures method.");
|
|
|
- pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
- StartSaveFileThread(curFldData);
|
|
|
- return false;
|
|
|
- }
|
|
|
+ m_EDSHardwareMgr.GetXRayByFeatures(bigparts, nXRayAQTime, true);
|
|
|
+ //{
|
|
|
+ // loger.Error("ImageProcess: call GetXRayByFeatures method.");
|
|
|
+ // pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
+ // StartSaveFileThread(curFldData);
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
|
|
@@ -236,15 +236,15 @@ namespace OTSModelSharp
|
|
|
nXRayAQTime = (uint)pXRayParam.GetFastXrayTime();
|
|
|
|
|
|
// get x-ray list (analysis) by points
|
|
|
- if (!m_EDSHardwareMgr.GetXRayByPoints(smallparts, nXRayAQTime, true))
|
|
|
- { // failed to call GetXRayByPoints method
|
|
|
+ m_EDSHardwareMgr.GetXRayByPoints(smallparts, nXRayAQTime, true);
|
|
|
+ //{ // failed to call GetXRayByPoints method
|
|
|
|
|
|
- loger.Error("ImageProcess: call GetXRayByPoints method.");
|
|
|
- pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
- StartSaveFileThread(curFldData);
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
+ // loger.Error("ImageProcess: call GetXRayByPoints method.");
|
|
|
+ // pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
+ // StartSaveFileThread(curFldData);
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
+ return ;
|
|
|
}
|
|
|
|
|
|
public void ParticleSpecialTreatment(CFieldDataClean fld)
|
|
@@ -275,14 +275,14 @@ namespace OTSModelSharp
|
|
|
partsMax.Add(p.Key);
|
|
|
}
|
|
|
List<CPosXrayClr> maxEDSXrays = new List<CPosXrayClr>();
|
|
|
- if (!m_EDSHardwareMgr.GetXRayByFeatures(partsMax, edsTime, true))
|
|
|
- {
|
|
|
- loger.Error("ImageProcess: call GetXRayByFeatures method for MaxEDS");
|
|
|
- m_Sample.GetMsrStatus(). SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
- StartSaveFileThread(curFldData);
|
|
|
+ m_EDSHardwareMgr.GetXRayByFeatures(partsMax, edsTime, true);
|
|
|
+ //{
|
|
|
+ // loger.Error("ImageProcess: call GetXRayByFeatures method for MaxEDS");
|
|
|
+ // m_Sample.GetMsrStatus(). SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
+ // StartSaveFileThread(curFldData);
|
|
|
|
|
|
- return;
|
|
|
- }
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
}
|
|
@@ -317,7 +317,7 @@ namespace OTSModelSharp
|
|
|
StartSaveFileThread(curFldData);
|
|
|
}
|
|
|
|
|
|
- public bool GetOriginalParticles()
|
|
|
+ public void GetOriginalParticles()
|
|
|
{
|
|
|
// measure status
|
|
|
CMsrSampleStatus pStatus = m_Sample.GetMsrStatus();
|
|
@@ -328,20 +328,20 @@ namespace OTSModelSharp
|
|
|
COTSImageProcParam pImgProcessParam = pMsrParam.GetImageProcessParam();
|
|
|
|
|
|
// remove BES image background
|
|
|
- if (!curFldData.RemoveBSEImageBG(pImgProcessParam))
|
|
|
- { // failed to call RemoveBSEImageBG method
|
|
|
- loger.Error("ImageProcess: call RemoveBSEImageBG method.");
|
|
|
- pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
- return false;
|
|
|
- }
|
|
|
+ curFldData.RemoveBSEImageBG(pImgProcessParam);
|
|
|
+ //{ // failed to call RemoveBSEImageBG method
|
|
|
+ // loger.Error("ImageProcess: call RemoveBSEImageBG method.");
|
|
|
+ // pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
|
|
|
+ // return false;
|
|
|
+ //}
|
|
|
|
|
|
// check if this is an empty image
|
|
|
if (curFldData.NoParticle())
|
|
|
{ // empty fields
|
|
|
loger.Info("ImageProcess: empty field.");
|
|
|
- return false;
|
|
|
+ //return false;
|
|
|
}
|
|
|
- return true;
|
|
|
+ return ;
|
|
|
}
|
|
|
public bool ClassifyQuantifyParticles(List<COTSParticleClr> a_listAnalysisParticles, string libname)// classify particles
|
|
|
{
|