|
@@ -58,7 +58,7 @@ namespace OTSModelSharp
|
|
|
curFldData.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
|
|
|
|
|
|
|
|
|
- ClassifyParticles(curFldData.ListAnalysisParticles);
|
|
|
+ ClassifyFieldParticles();
|
|
|
|
|
|
|
|
|
|
|
@@ -154,39 +154,7 @@ namespace OTSModelSharp
|
|
|
bigparts.Add(part);
|
|
|
}
|
|
|
}
|
|
|
- // 3) according to the presettings,make sure we won't do the xray processing work for too many small particles.
|
|
|
- //var fieldParam = m_Sample.GetMsrParams().GetImageScanParam();
|
|
|
- //double smallPartnum;
|
|
|
- // List<COTSParticleClr> smallPartList = new List<COTSParticleClr>();
|
|
|
- //double percentage = 100;
|
|
|
- //switch (fieldParam.GetFieldStopMode())
|
|
|
- //{
|
|
|
- // case otsdataconst.OTS_MEASURE_FIELD_STOP_MODE.ParticlesPercentage:
|
|
|
- // percentage = fieldParam.GetFieldSmallParticlesPercentage();
|
|
|
- // percentage = percentage / 100;// according to the percentage
|
|
|
- // smallPartnum = smallparts.Count() * percentage;
|
|
|
- // for (int i = 0; i < smallPartnum; i++)
|
|
|
- // {
|
|
|
-
|
|
|
- // smallPartList.Add(smallparts[i]);
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // case otsdataconst.OTS_MEASURE_FIELD_STOP_MODE.Particles:
|
|
|
- // percentage = 1;
|
|
|
- // smallPartnum = fieldParam.GetFieldSmallParticleNum();//according to the numbers.
|
|
|
- // if (smallPartnum < smallparts.Count())
|
|
|
- // {
|
|
|
- // for (int i = 0; i < smallPartnum; i++)
|
|
|
- // {
|
|
|
- // smallPartList.Add(smallparts[i]);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // default:
|
|
|
- // percentage = 1;
|
|
|
- // smallPartList = smallparts;
|
|
|
- // break;
|
|
|
- //}
|
|
|
+
|
|
|
|
|
|
fld.ListSmallParticles = smallparts;
|
|
|
fld.ListBigParticles = bigparts;
|
|
@@ -270,19 +238,20 @@ namespace OTSModelSharp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void ClassifyParticles(CFieldDataClean fld)
|
|
|
+ public override void ClassifyFieldParticles()
|
|
|
{
|
|
|
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
+ CFieldDataClean curFldDataCln = (CFieldDataClean)curFldData;
|
|
|
string libname = m_Sample.GetMsrParams().GetSTDName();
|
|
|
if (libname != "NoSTDDB")
|
|
|
{
|
|
|
log.Info("Begin to classify big particles!Using " + libname);
|
|
|
- var bigparts = fld.ListBigParticles;
|
|
|
+ var bigparts = curFldDataCln.ListBigParticles;
|
|
|
ClassifyQuantifyParticles(bigparts,libname);
|
|
|
- ClassifySmallParticles(fld, libname);
|
|
|
+ var smallParts = curFldDataCln.ListSmallParticles;
|
|
|
+ ClassifySmallParticles(smallParts, libname);
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -293,7 +262,29 @@ namespace OTSModelSharp
|
|
|
|
|
|
|
|
|
}
|
|
|
+ public override void ClassifyMergedParticles(List<COTSParticleClr> mergedParts)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ var quantifyparts = mergedParts;
|
|
|
+ int nSize = quantifyparts.Count();
|
|
|
+
|
|
|
+ // go through all analysis particles
|
|
|
+ for (int i = 0; i < nSize; ++i)
|
|
|
+ {
|
|
|
+ string libname = m_Sample.GetMsrParams().GetSTDName();
|
|
|
+ ClassifyQuantifyParticles(quantifyparts, libname);
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ log.Info(" classify failed. " + e.Message);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
public void SaveFieldParticlesData()
|
|
|
{
|
|
|
StartSaveFileThread(curFldData);
|
|
@@ -345,9 +336,9 @@ namespace OTSModelSharp
|
|
|
// ok, return TRUE
|
|
|
return true;
|
|
|
}
|
|
|
- public bool ClassifySmallParticles(CFieldDataClean fld, string libname)
|
|
|
+ public bool ClassifySmallParticles(List<COTSParticleClr> smallparts, string libname)
|
|
|
{
|
|
|
- List<COTSParticleClr> a_listAnalysisParticles = fld.ListSmallParticles;
|
|
|
+ List<COTSParticleClr> a_listAnalysisParticles = smallparts;
|
|
|
|
|
|
int nSize = (int)a_listAnalysisParticles.Count();
|
|
|
|