|  | @@ -30,19 +30,19 @@ namespace OTSModelSharp
 | 
	
		
			
				|  |  |              int nNewFieldId;
 | 
	
		
			
				|  |  |              nNewFieldId = m_pSampleRstFile.GetIdForANewField();
 | 
	
		
			
				|  |  |              //first step:remove background of the bse image and compound all the finded particles.
 | 
	
		
			
				|  |  | -            CFieldDataClean curFldDataMgr = new CFieldDataClean( a_BSEImg,m_Sample.CalculatePixelSize());
 | 
	
		
			
				|  |  | -            curFldDataMgr.SetId(nNewFieldId);
 | 
	
		
			
				|  |  | -            curFldDataMgr.SetPosition(fldCenter);
 | 
	
		
			
				|  |  | +            curFldData = new CFieldDataClean( a_BSEImg,m_Sample.CalculatePixelSize());
 | 
	
		
			
				|  |  | +            curFldData.SetId(nNewFieldId);
 | 
	
		
			
				|  |  | +            curFldData.SetPosition(fldCenter);
 | 
	
		
			
				|  |  |              GetOriginalParticles();
 | 
	
		
			
				|  |  |   
 | 
	
		
			
				|  |  |              // second step :filter the finded particles.
 | 
	
		
			
				|  |  | -            FilterParticles(curFldDataMgr);
 | 
	
		
			
				|  |  | +            FilterParticles((CFieldDataClean)curFldData);
 | 
	
		
			
				|  |  |              COTSXRayParam pXRayParam = m_Sample.GetMsrParams().GetXRayParam();
 | 
	
		
			
				|  |  |              //collect xray data.
 | 
	
		
			
				|  |  |              if (pXRayParam.GetUsingXray() == (int)OTS_USING_X_RAY.Yes)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  Thread.Sleep(100);
 | 
	
		
			
				|  |  | -                CollectParticlesXrayData(curFldDataMgr);
 | 
	
		
			
				|  |  | +                CollectParticlesXrayData((CFieldDataClean)curFldData);
 | 
	
		
			
				|  |  |                  Thread.Sleep(100);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |        
 | 
	
	
		
			
				|  | @@ -50,17 +50,17 @@ namespace OTSModelSharp
 | 
	
		
			
				|  |  |              //special treatment.
 | 
	
		
			
				|  |  |              //ParticleSpecialTreatment();
 | 
	
		
			
				|  |  |              loger.Info("Begin to Calculate the image property of every particle!");
 | 
	
		
			
				|  |  | -            var analysisparts = curFldDataMgr.ListBigParticles;
 | 
	
		
			
				|  |  | -            curFldDataMgr.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
 | 
	
		
			
				|  |  | +            var analysisparts = curFldData.ListAnalysisParticles;
 | 
	
		
			
				|  |  | +            curFldData.CalParticleImageProp(analysisparts);//calculate particle image property such as feret diameter, DMAX etc.
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            ClassifyParticles(curFldDataMgr);
 | 
	
		
			
				|  |  | +            ClassifyParticles(curFldData.ListAnalysisParticles);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              // save field files
 | 
	
		
			
				|  |  |              m_Sample.GetMsrStatus() .SetStatus(OTS_MSR_SAMPLE_STATUS.SUCCESSED);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            StartSaveFileThread(curFldDataMgr);
 | 
	
		
			
				|  |  | +            StartSaveFileThread(curFldData);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              return true;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -386,7 +386,7 @@ namespace OTSModelSharp
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            pDBFileMgr.BeginTransaction();
 | 
	
		
			
				|  |  | +            //pDBFileMgr.BeginTransaction();
 | 
	
		
			
				|  |  |              pDBFileMgr.SaveStatusDataToDB();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if (!pDBFileMgr.SaveIncADataToDB(f.ListAnalysisParticles, f.GetPosition()))
 | 
	
	
		
			
				|  | @@ -453,7 +453,7 @@ namespace OTSModelSharp
 | 
	
		
			
				|  |  |                  smallPartDB.SaveAKindOfSmallParticle(smallp, new CPosXrayClr(), new System.Drawing.Point(0, 0));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            pDBFileMgr.CommitTransaction();
 | 
	
		
			
				|  |  | +            //pDBFileMgr.CommitTransaction();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              return true;
 | 
	
		
			
				|  |  |          }
 |