Bladeren bron

calculate the merged particles's position.

gsp 3 jaren geleden
bovenliggende
commit
c68e754e85

+ 1 - 0
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -2173,6 +2173,7 @@ namespace OTSIMGPROC
 			COTSSegmentsList newSegs;
 			auto p = pair.first;
 			newPart->SetAbsolutePos(p->GetAbsolutPos());
+			
 			//firstly,we sum up all the merged particles's area and get the represent string.
 			std::string partsStr = std::to_string(p->GetFieldId()) + ":" + std::to_string(p->GetAnalysisId());
 			double allPartArea = p->GetArea();//Get the first particle's area.

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/1-OTSInclution/SmplMeasureInclution.cs

@@ -149,7 +149,7 @@ namespace OTSModelSharp
             foreach (var p in curFldData.ListAnalysisParticles)
             {
                
-                Point fldOtsPos = new Point(curFldData.PoiPos.X, curFldData.PoiPos.Y);
+                Point fldOtsPos = new Point(curFldData.PoiPos.X, curFldData.PoiPos.Y);//take the field position as the particle's position instead
                 Point semPos = new Point();
                 pCSEMStageData.ConverOTSToSEMPoint(fldOtsPos, ref semPos);
                 p.SetAbsolutPos(semPos);

+ 2 - 2
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -748,7 +748,7 @@ namespace OTSModelSharp
                     Thread.Sleep(100);
                 }
                 //merging particles
-                log.Info("Merging big particles on the field edge!");
+                log.Info("Merging big particles which are crossing the field edge!");
                 CImageHandler imgpro = new CImageHandler();
                 int scanfldsize = m_Sample.GetSEMDataMsr().GetScanFieldSize();
                 List<COTSParticleClr> mergedParticles = new List<COTSParticleClr>();
@@ -1061,7 +1061,7 @@ namespace OTSModelSharp
  
             foreach (COTSParticleClr part in mergedParts)
             {
-                mergedpartdb.SaveAParticle(part, part.GetXray(), new System.Drawing.Point(0, 0));
+                mergedpartdb.SaveAParticle(part, part.GetXray(), (Point)part.GetAbsolutPos());
             }
             CPosXrayDBMgr pXrayDBMgr = pDBFileMgr.GetPosXrayDBMgr();
             CElementChemistryDB xraydb = pXrayDBMgr.GetElementChemistryDB();

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/ParticleData/MergedParticles/MergeParticleDB.cs

@@ -23,7 +23,7 @@ namespace OTSModelSharp
 		var tableInfoPtr = GetTableInfo();		
 		var datastorePtr = GetDatastore();
             Rectangle prec = (Rectangle)a_pParticle.GetParticleRect();
-            System.Drawing.Point pos = (System.Drawing.Point)a_pParticle.GetXRayPos();
+            System.Drawing.Point pos = (System.Drawing.Point)a_pParticle.GetAbsolutPos();
             String sInsertFormat = tableInfoPtr.GetInsertCommandFormatString(true);
         String sSQLCommand = String.Format(sInsertFormat,
             a_pParticle.GetFieldId(),