|
|
@@ -1,6 +1,7 @@
|
|
|
using OTSDataType;
|
|
|
using OTSIncAMeasureApp.OTSMeasureControl;
|
|
|
using OTSModelSharp.DTL;
|
|
|
+using OTSModelSharp.MeasureControl;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Drawing;
|
|
|
@@ -91,6 +92,8 @@ namespace OTSModelSharp
|
|
|
// measure thread
|
|
|
MsrThread m_pMsrThread;
|
|
|
|
|
|
+ IClassifyEngine m_engine;
|
|
|
+
|
|
|
public COTSProjMgrFile()
|
|
|
{
|
|
|
Init();
|
|
|
@@ -578,6 +581,27 @@ namespace OTSModelSharp
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // file name
|
|
|
+ public String GetFileName()
|
|
|
+ {
|
|
|
+ // make a copy of file path name
|
|
|
+ String strPathName = m_strPathName;
|
|
|
+
|
|
|
+ // is this a new file?
|
|
|
+ strPathName.Trim();
|
|
|
+ if (strPathName.CompareTo(UNTITLED_FILE_NAME) == 0)
|
|
|
+ {
|
|
|
+ return strPathName;
|
|
|
+ }
|
|
|
+
|
|
|
+ // get file name
|
|
|
+ String strFileName = GetFileNameWithoutExtension(strPathName);
|
|
|
+ strFileName = GetFileName(strFileName);
|
|
|
+
|
|
|
+ // return file name
|
|
|
+ return strFileName;
|
|
|
+ }
|
|
|
+
|
|
|
// SEM stage data
|
|
|
public CSEMStageData GetSEMStageData() { return m_pSEMStageData; }
|
|
|
|
|
|
@@ -913,6 +937,7 @@ namespace OTSModelSharp
|
|
|
|
|
|
public bool DeleteSampleByIndex(int a_nIndex)
|
|
|
{
|
|
|
+ String strSamplePath = GetFolderName(m_strPathName);
|
|
|
// check the index
|
|
|
if (a_nIndex < 0 || a_nIndex >= (int)m_listSamples.Count)
|
|
|
{
|
|
|
@@ -1413,26 +1438,7 @@ namespace OTSModelSharp
|
|
|
// get modify flag
|
|
|
public bool IsModified() { return m_bModify; }
|
|
|
|
|
|
- // file name
|
|
|
- public String GetFileName()
|
|
|
- {
|
|
|
- // make a copy of file path name
|
|
|
- String strPathName = m_strPathName;
|
|
|
-
|
|
|
- // is this a new file?
|
|
|
- strPathName.Trim();
|
|
|
- if (strPathName.CompareTo(UNTITLED_FILE_NAME) == 0)
|
|
|
- {
|
|
|
- return strPathName;
|
|
|
- }
|
|
|
-
|
|
|
- // get file name
|
|
|
- String strFileName = GetFileNameWithoutExtension(strPathName);
|
|
|
- strFileName = GetFileName(strFileName);
|
|
|
-
|
|
|
- // return file name
|
|
|
- return strFileName;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
// get file name without extension
|
|
|
public String GetFileNameWithoutExtension(String a_strPathName)
|
|
|
@@ -1842,7 +1848,41 @@ namespace OTSModelSharp
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ public bool ReClassify()
|
|
|
+ {
|
|
|
+ foreach (var spl in m_listSamples)
|
|
|
+ {
|
|
|
+ String strFilePath = GetFolderName(m_strPathName);
|
|
|
+ String strFieldFileSubFolder = strFilePath + "\\" + spl.GetName() + "\\" + SMPL_MSR_RESULT_FIELDS_FILE_SUBFOLDER + "\\";
|
|
|
+
|
|
|
+ String strIncAFilename = strFieldFileSubFolder + "\\" + SMPL_MSR_RESULT_INCLUSION_FILE;
|
|
|
+ CIncAFileMgr pIncAFileMgr = new CIncAFileMgr(strIncAFilename);
|
|
|
+
|
|
|
+
|
|
|
+ foreach (var fld in spl.GetFieldsData())
|
|
|
+ {
|
|
|
+ foreach (var part in fld.GetParticleList())
|
|
|
+ {
|
|
|
+ string libname = spl.GetMsrParams().GetSTDName();
|
|
|
+ IClassifyEngine engine = GetParticleEngine(libname);
|
|
|
+
|
|
|
+ if (!engine.Classify(part, part.GetXrayInfo()))
|
|
|
+ {
|
|
|
+ // invalid x-ray pointer.
|
|
|
+ Nloger.Error("ClassifyParticle: can't identify the particle as any particle.");
|
|
|
+ /*return FALSE;*/
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pIncAFileMgr.SetParticleList(fld.GetParticleList(), true);
|
|
|
+ pIncAFileMgr.UpdateIncAList();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
+ public IClassifyEngine GetParticleEngine(string libname) { return m_engine; }
|
|
|
|
|
|
public COTSGeneralParameters GetDefaultParameters() { return m_DefaultParameters; }
|
|
|
|