Browse Source

Update the display of spliced particle selection

cxs 1 month ago
parent
commit
99a2868f54

+ 109 - 68
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -506,7 +506,7 @@ namespace OTSIncAReportGrids
 
                 int add_rowindex = dgV_ParticlesDevidePage.Rows.Add();
                 dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[0].Value = (pageSize * (PageIndex - 1) + add_rowindex + 1).ToString();
-
+                Dictionary<string, Bitmap> fieldpics=new Dictionary<string, Bitmap>();
                 for (int k = 0; k < keyValues.Count; k++)
                 {
                     if (enl.MoveNext())
@@ -516,8 +516,45 @@ namespace OTSIncAReportGrids
                             string subt = particles.Rows[i]["SubParticles"].ToString();
                             dgV_ParticlesDevidePage.Rows[add_rowindex].Height = 150;
                             
-                            dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = Particledata.GetParticlescreenshot(subt,result);
+                            
                             dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
+
+                            Bitmap bmap = null;
+                            if (subt != null && subt != "" && subt != "IsSubParticle")
+                            {
+                                double ScanFieldSize = result.GetScanFieldSizeX();
+                                string filePatht = result.FilePath + "\\FIELD_FILES\\";
+                                string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
+                                Bitmap tempbit = Particledata.ReadImageFile(imagePatht);
+                                int pixw = tempbit.Width;
+                                double xs = pixw / ScanFieldSize;
+                                OTS_X_AXIS_DIRECTION X_AXIS_DIRECTION = result.GetXAxisDirEnum();
+                                OTS_Y_AXIS_DIRECTION Y_AXIS_DIRECTION = result.GetYAxisDirEnum();
+
+
+                                bmap = Particledata.GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, X_AXIS_DIRECTION, Y_AXIS_DIRECTION);
+                                if (bmap != null)
+                                {
+                                    string[] str = subt.Split(',');
+                                    bmap.Tag = new List<string>() { str[0].Split(':')[0], str[0].Split(':')[1] };
+                                }
+                                bmap.Save("C:\\Users\\yunyunyun\\Desktop\\9-9-1\\aa.bmp");
+                            }
+                            else if (subt != "IsSubParticle")
+                            {
+                                if (!fieldpics.Keys.Contains(particles.Rows[i]["fieldid"].ToString()))
+                                {
+                                    string imagePath = filePath + "Field" + particles.Rows[i]["fieldid"].ToString() + ".bmp";
+
+                                    
+                                    fieldpics.Add(particles.Rows[i]["fieldid"].ToString(), Particledata.ReadImageFile(imagePath));
+                                }
+                                Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(particles.Rows[i]["RectLeft"]), Y = Convert.ToInt32(particles.Rows[i]["RectTop"]), Width = Convert.ToInt32(particles.Rows[i]["RectWidth"]), Height = Convert.ToInt32(particles.Rows[i]["RectHeight"]) };
+                                bmap = Particledata.GetBitmapByParticle(fieldpics[particles.Rows[i]["fieldid"].ToString()], rectangle);
+                                bmap.Tag = new List<string>() { particles.Rows[i]["FieldId"].ToString(), particles.Rows[i]["ParticleId"].ToString()};
+                                dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20;
+                            }
+                            dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
                         }
                         if (enl.Current.Key == "DiameterRatio")
                         {
@@ -1279,6 +1316,13 @@ namespace OTSIncAReportGrids
             }
             #endregion
         }
+
+
+
+
+
+
+
         /// <summary>
         /// 页面控件呈现
         /// </summary>
@@ -2315,24 +2359,24 @@ namespace OTSIncAReportGrids
 
         private void dgV_ParticlesDevidePage_MouseDown(object sender, MouseEventArgs e)
         {
-            var SelectRows = dgV_ParticlesDevidePage.SelectedRows;
-            int sel = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
-            {
-                if (sel != (int)SelItem.MergeParticles)
-                {
-                    if (SelectRows != null && SelectRows.Count == 1)
-                    {
-                        DataGridViewRow dgvr = SelectRows[0];
-                        Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
-                        List<string> list_str = (List<string>)ls_bp.Tag;
-                    }
-                    ToolStripMenuItemDelete_Particle.Visible = true;
-                }
-                else
-                {
-                    ToolStripMenuItemDelete_Particle.Visible = false;
-                }
-            }
+            //var SelectRows = dgV_ParticlesDevidePage.SelectedRows;
+            //int sel = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
+            //{
+                //if (sel != (int)SelItem.MergeParticles)
+                //{
+                //    if (SelectRows != null && SelectRows.Count == 1)
+                //    {
+                //        DataGridViewRow dgvr = SelectRows[0];
+                //        Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
+                //        List<string> list_str = (List<string>)ls_bp.Tag;
+                //    }
+                ToolStripMenuItemDelete_Particle.Visible = true;
+                //}
+                //else
+                //{
+                //    ToolStripMenuItemDelete_Particle.Visible = false;
+                //}
+            //}
         }
         
 
@@ -2374,45 +2418,44 @@ namespace OTSIncAReportGrids
         }
 
 
-        private void SaveParticleslist_select()
-        {
-            ParticleData fielddata = new ParticleData(result.FilePath);
-            List<Particle> particles = fielddata.GetParticleAllList();
-
-            Particleslist_selecttodisplay.Clear();
-            for (int l = 0; l < dgV_ParticlesDevidePage.SelectedRows.Count; l++)
-            {
-                //从事先加载的Bitmap对象的Tag中取出List<string>
-                DataGridViewRow dgvr = dgV_ParticlesDevidePage.SelectedRows[l];
-                Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
-                List<string> list_str = (List<string>)ls_bp.Tag;
-                if (list_str != null)
-                {
-                    int i_ls_fieldid = Convert.ToInt32(list_str[0]);
-                    int i_ls_particleid = Convert.ToInt32(list_str[1]);
-                    foreach (Particle item in particles)
-                    {
-                        if (i_ls_fieldid == item.FieldId && i_ls_particleid == item.ParticleId)
-                        {
-                            Particleslist_selecttodisplay.Add(item);
-                            break;
-                        }
-                    }
-
-                }
-            }
-        }
-
-        public List<Particle> GetParticleslist_select()
-        {
-            return Particleslist_selecttodisplay;
-        }
+        //private void SaveParticleslist_select()
+        //{
+        //    ParticleData fielddata = new ParticleData(result.FilePath);
+        //    List<Particle> particles = fielddata.GetParticleAllList();
+
+        //    Particleslist_selecttodisplay.Clear();
+        //    for (int l = 0; l < dgV_ParticlesDevidePage.SelectedRows.Count; l++)
+        //    {
+        //        //从事先加载的Bitmap对象的Tag中取出List<string>
+        //        DataGridViewRow dgvr = dgV_ParticlesDevidePage.SelectedRows[l];
+        //        Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
+        //        List<string> list_str = (List<string>)ls_bp.Tag;
+        //        if (list_str != null)
+        //        {
+        //            int i_ls_fieldid = Convert.ToInt32(list_str[0]);
+        //            int i_ls_particleid = Convert.ToInt32(list_str[1]);
+        //            foreach (Particle item in particles)
+        //            {
+        //                if (i_ls_fieldid == item.FieldId && i_ls_particleid == item.ParticleId)
+        //                {
+        //                    Particleslist_selecttodisplay.Add(item);
+        //                    break;
+        //                }
+        //            }
+
+        //        }
+        //    }
+        //}
+
+        //public List<Particle> GetParticleslist_select()
+        //{
+        //    return Particleslist_selecttodisplay;
+        //}
 
 
 
         private void dgV_ParticlesDevidePage_MouseUp(object sender, MouseEventArgs e)
         {
-            int sel = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
             ToolStripMenuItem_SimilarityReclassification.Enabled = false;
             var SelectRows = dgV_ParticlesDevidePage.SelectedRows;
             if (SelectRows.Count != 0)
@@ -2421,18 +2464,18 @@ namespace OTSIncAReportGrids
                 {
                     DataGridViewRow dgvr = SelectRows[0];
                     Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
-                    
-                    
-                    
                     uint[] Search_xray = new uint[2000];
                     uint[] Analysis_xray = new uint[2000];
                     int i_xray_id = 0;
                     List<Element> list_celementchemistryclr = new List<Element>();
                     Particle particle=new Particle();
-                    var tPt = new ParticleData(ReportFun.resultFile.FilePath);
-                    if (sel == (int)SelItem.MergeParticles)
+                    string str = " particleId= " + dgvr.Cells["particleId"].Value.ToString() + " and fieldid = " + dgvr.Cells["fieldid"].Value.ToString();
+                    DataRow[] drs = particles.Select(str);
+                    DataRow row = drs[0];
+                    string subt = row["SubParticles"].ToString();
+                    if (subt != ""&& subt != null)
                     {
-                        particle = tPt.GetXrayByParticleTagIDAndFieldID_ForMergeParticle(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray);
+                        particle = Particledata.GetXrayByParticleTagIDAndFieldID_ForMergeParticle(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray);
                         list_celementchemistryclr = particle.ElementList;
                     }
                     else
@@ -2440,7 +2483,7 @@ namespace OTSIncAReportGrids
                         particle = ReportFun.GetXrayByParticleTagIDAndFieldID_ForDrawDistrbutionImageAndBSE(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray, out i_xray_id, out list_celementchemistryclr);
                     }
 
-                    List<ShowElementInfo> list_showelementinfo = tPt.GetShowElementInfos_ForMergeParticle(list_celementchemistryclr);
+                    List<ShowElementInfo> list_showelementinfo = Particledata.GetShowElementInfos_ForMergeParticle(list_celementchemistryclr);
                     string str_IncAName = "";
                     str_IncAName = Convert.ToString(dgvr.Cells[1].Value);
                     if (particle == null)
@@ -2454,7 +2497,7 @@ namespace OTSIncAReportGrids
                     control_XRayTable1.MaterialName = str_IncAName;
                     control_XRayTable1.List_ShowElementInfo = list_showelementinfo;
 
-                    if (sel != (int)SelItem.MergeParticles)
+                    if (subt == "" || subt == null)
                     {
                         Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(particle.RectLeft), Y = Convert.ToInt32(particle.RectTop), Width = Convert.ToInt32(particle.RectWidth), Height = Convert.ToInt32(particle.RectHeight) };
                         Bitmap dpImage = ReportFun.GetBlackAndWhiteImage(particle);
@@ -2470,23 +2513,21 @@ namespace OTSIncAReportGrids
                     {
                         double ScanFieldSize = result.GetScanFieldSizeX();
                         string filePatht = result.FilePath + "\\FIELD_FILES\\";
-                        string str = " particleId= " + dgvr.Cells["particleId"].Value.ToString() + " and fieldid = " + dgvr.Cells["fieldid"].Value.ToString();
-                        DataRow[] drs = particles.Select(str);
-                        DataRow row = drs[0];
-                        string subt = row["SubParticles"].ToString();
+                        
                         string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
                         Bitmap tempbit = Particledata.ReadImageFile(imagePatht);
                         int pixw = tempbit.Width;
                         double xs = pixw / ScanFieldSize;
                         OTS_X_AXIS_DIRECTION X_AXIS_DIRECTION = result.GetXAxisDirEnum();
                         OTS_Y_AXIS_DIRECTION Y_AXIS_DIRECTION = result.GetYAxisDirEnum();
-                        Bitmap bp= Particledata.GetBitmapForBigBlackAndWhiteImage(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, X_AXIS_DIRECTION, Y_AXIS_DIRECTION);  
+                        Bitmap bp= Particledata.GetBitmapForBigBlackAndWhiteImage(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, X_AXIS_DIRECTION, Y_AXIS_DIRECTION);
+                        bp.Save("C:\\Users\\yunyunyun\\Desktop\\9-9-1\\aa.bmp");
                         control_XRayTable1.SetBitmapOfPictureBox(ls_bp,bp);
                         Invalidate();
                     }
                     ToolStripMenuItem_SimilarityReclassification.Enabled = true;
                 }
-                SaveParticleslist_select();
+                //SaveParticleslist_select();
             }
         }
 

+ 1 - 1
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -187,7 +187,7 @@ namespace OTSIncAReportApp
                     }
                     break;
                 case (int)DisplayPicutureType.AnalyzeDataTable:
-                    Particles = im_ParticlesGridDevidePage.GetParticleslist_select();
+                    //Particles = im_ParticlesGridDevidePage.GetParticleslist_select();
                     break;
                 default:
                     break;

+ 8 - 8
OTSIncAReportApp/1-UI/frmSampleImage.cs

@@ -72,19 +72,19 @@ namespace OTSIncAReportApp
             //判断分布图,排序图全局对象是否为空,不为空的话,加载选择列表,用此来代替刷新,对颗粒列表中的选择颗粒,显示选择到分布图与排序图中
             if (m_ReportApp.im_Control_DrawDistrbutionImageAndBSE != null)
             {
-                if (m_ReportApp.im_ParticlesGridDevidePage != null)
-                {
-                    //分布图显示选择颗粒
-                    m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.DisplayParticleByParticlelist(m_ReportApp.im_ParticlesGridDevidePage.GetParticleslist_select());
-                }
+                //if (m_ReportApp.im_ParticlesGridDevidePage != null)
+                //{
+                //    //分布图显示选择颗粒
+                //    m_ReportApp.im_Control_DrawDistrbutionImageAndBSE.DisplayParticleByParticlelist(m_ReportApp.im_ParticlesGridDevidePage.GetParticleslist_select());
+                //}
             }
             if (m_ReportApp.im_Control_DrawDistrbutionSortImage != null)
             {
-                if (m_ReportApp.im_ParticlesGridDevidePage != null)
-                {
+                //if (m_ReportApp.im_ParticlesGridDevidePage != null)
+                //{
                     //排序图显示选择颗粒
                     m_ReportApp.im_Control_DrawDistrbutionSortImage.SetSelectParticle(m_ReportApp.GetSelectedParticles());
-                }
+                //}
             }
 
         }

+ 47 - 59
OTSIncAReportApp/3-ServiceCenter/DataOperation/DataAccess/ParticleData.cs

@@ -102,8 +102,8 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
             string sqlp = @"select *,
                             (select group_concat(name||'-'||Percentage,';')  
-                            from ElementChemistry where XRayId	=MergedParticleInfo.XRayId		and fieldid=MergedParticleInfo.fieldid	) as Element
-                            from 	MergedParticleInfo  where FieldId=" + fieldid.ToString() + " and ParticleId="+ particleid.ToString();
+                            from ElementChemistry where XRayId	=IncAData.XRayId		and fieldid=IncAData.fieldid	) as Element
+                            from 	IncAData  where FieldId=" + fieldid.ToString() + " and ParticleId="+ particleid.ToString();
 
             DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
             List<Particle> listp = dbHelper.TableToList<Particle>(DT);
@@ -316,7 +316,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
         public DataTable GetParticleAllforparticlelist(string fieldAndPartic)
         {
-            string sqlp = @"select * from INcAData where typeid !=-1";
+            string sqlp = @"select * from INcAData where typeid !=-1 and SubParticles is not 'IsSubParticle' ";
             if (fieldAndPartic != "")
             {
                 sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
@@ -326,7 +326,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         public DataTable GetMergedParticle(string fieldAndPartic)
         {
-            string sqlp = @"select * from MergedParticleInfo where typeid !=-1";
+            string sqlp = @"select * from INcAData where typeid !=-1 and SubParticles is not 'IsSubParticle' and SubParticles is not null ";
             if (fieldAndPartic != "")
             {
                 sqlp = sqlp + " and '" + fieldAndPartic + "' like ('%,'||fieldid||'-'||particleid||',%')";
@@ -778,7 +778,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
         public DataTable GetInfoForPartucleDevidePage_otherParticle(string condition)
         {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where (xrayid > -1  and SubParticles is not 'IsSubParticle' and (typeid =9 or typeid =0 or typeid =-1 or typeid =4)) " +
+            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData where (xrayid > -1  and SubParticles is not 'IsSubParticle' and (typeid =9 or typeid =-1 or typeid =4)) " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -791,7 +791,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         /// <returns></returns>
         public DataTable GetInfoForPartucleDevidePage_mergeParticles(string condition)
         {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where (SubParticles Is not null and SubParticles is not 'IsSubParticle' )" + condition;
+            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData where (SubParticles Is not null and SubParticles is not 'IsSubParticle' )" + condition;
             DataTable DT1 = new DataTable();
             try
             {
@@ -806,7 +806,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
 
         public DataTable GetInfoForPartucleDevidePage_allParticles(string condition)
         {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData  where xrayid > -1 and SubParticles is not 'IsSubParticle' " +
+            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData  where xrayid > -1 and SubParticles is not 'IsSubParticle' " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -823,7 +823,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         
         public DataTable GetInfoForPartucleDevidePage_NotIdentifyParticle(string condition)
         {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =9 " +
+            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =9 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -831,7 +831,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         public DataTable GetInfoForPartucleDevidePage_InvalidParticle(string condition)
         {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =-1 " +
+            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =-1 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -839,7 +839,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         }
         public DataTable GetInfoForPartucleDevidePage_LowCountsParticle(string condition)
         {
-            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 typeid =4 " +
+            string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 typeid =4 " +
                 condition;
             DataTable DT = new DataTable();
             DT = dbHelper.ExecuteQuery(sqliteString);
@@ -929,18 +929,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
         /// <returns></returns>
         public DataTable GetAllParticleWithMergeParticlesWithoutEle(string condition)
         {
-            DataTable particlesAll = new DataTable();
-            DataTable particlesAll1 = GetParticleAllforparticlelist(condition);
-            DataTable mergeParticles = GetMergedParticle(condition);
-            if (mergeParticles != null && mergeParticles.Rows.Count > 0)
-            {
-                RemoveMergeParticles(ref particlesAll1, mergeParticles);
-            }
-            particlesAll = particlesAll1.Copy();
-            foreach (DataRow item in mergeParticles.Rows)
-            {
-                particlesAll.ImportRow(item);
-            }
+            DataTable particlesAll = GetParticleAllforparticlelist(condition);
             return particlesAll;
         }
 
@@ -1410,45 +1399,44 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
             return list_showelementinfo;
         }
         
-
-        public Bitmap GetParticlescreenshot(string subt, ResultFile result)
-        {
-            Bitmap bmap = null;
-            KeyValuePair<string, Bitmap> FieldImage = new KeyValuePair<string, Bitmap>();
-            if (subt != null && subt != "" && subt != "IsSubParticle")
-            {
-                double ScanFieldSize = result.GetScanFieldSizeX();
-                string filePatht = result.FilePath + "\\FIELD_FILES\\";
-                string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
-                Bitmap tempbit = ReadImageFile(imagePatht);
-                int pixw = tempbit.Width;
-                double xs = pixw / ScanFieldSize;
-                OTS_X_AXIS_DIRECTION X_AXIS_DIRECTION = result.GetXAxisDirEnum();
-                OTS_Y_AXIS_DIRECTION Y_AXIS_DIRECTION = result.GetYAxisDirEnum();
+        //public Bitmap GetParticlescreenshot(string subt, ResultFile result)
+        //{
+        //    Bitmap bmap = null;
+        //    KeyValuePair<string, Bitmap> FieldImage = new KeyValuePair<string, Bitmap>();
+        //    if (subt != null && subt != "" && subt != "IsSubParticle")
+        //    {
+        //        double ScanFieldSize = result.GetScanFieldSizeX();
+        //        string filePatht = result.FilePath + "\\FIELD_FILES\\";
+        //        string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
+        //        Bitmap tempbit = ReadImageFile(imagePatht);
+        //        int pixw = tempbit.Width;
+        //        double xs = pixw / ScanFieldSize;
+        //        OTS_X_AXIS_DIRECTION X_AXIS_DIRECTION = result.GetXAxisDirEnum();
+        //        OTS_Y_AXIS_DIRECTION Y_AXIS_DIRECTION = result.GetYAxisDirEnum();
                 
 
-                bmap = GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, X_AXIS_DIRECTION, Y_AXIS_DIRECTION);
-                if (bmap != null)
-                {
-                    string[] str = subt.Split(',');
-                    //bmap.Tag = new List<string>() { str[0].Split(':')[0], str[0].Split(':')[1], particles.Rows[i]["TypeId"].ToString() };
-                }
-            }
-            else if (subt != "IsSubParticle")
-            {
-                //if (FieldImage.Key != particles.Rows[i]["fieldid"].ToString() || FieldImage.Value == null)
-                //{
-                //    string imagePath = filePath + "Field" + particles.Rows[i]["fieldid"].ToString() + ".bmp";
-                //    FieldImage = new KeyValuePair<string, Bitmap>(particles.Rows[i]["fieldid"].ToString(), Particledata.ReadImageFile(imagePath));
-                //}
-                //Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(particles.Rows[i]["RectLeft"]), Y = Convert.ToInt32(particles.Rows[i]["RectTop"]), Width = Convert.ToInt32(particles.Rows[i]["RectWidth"]), Height = Convert.ToInt32(particles.Rows[i]["RectHeight"]) };
-                //Bitmap bmap = GetBitmapByParticle(FieldImage.Value, rectangle);
-                //bmap.Tag = new List<string>() { particles.Rows[i]["FieldId"].ToString(), particles.Rows[i]["ParticleId"].ToString(), particles.Rows[i]["TypeId"].ToString(), particles.Rows[i]["XrayId"].ToString() };
-                //dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
-                //dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20;
-            }
-            return bmap;
-        }
+        //        bmap = GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, X_AXIS_DIRECTION, Y_AXIS_DIRECTION);
+        //        if (bmap != null)
+        //        {
+        //            string[] str = subt.Split(',');
+        //            bmap.Tag = new List<string>() { str[0].Split(':')[0], str[0].Split(':')[1]};
+        //        }
+        //    }
+        //    else if (subt != "IsSubParticle")
+        //    {
+        //        if (FieldImage.Key != particles.Rows[i]["fieldid"].ToString() || FieldImage.Value == null)
+        //        {
+        //            string imagePath = filePath + "Field" + particles.Rows[i]["fieldid"].ToString() + ".bmp";
+        //            FieldImage = new KeyValuePair<string, Bitmap>(particles.Rows[i]["fieldid"].ToString(), Particledata.ReadImageFile(imagePath));
+        //        }
+        //        Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(particles.Rows[i]["RectLeft"]), Y = Convert.ToInt32(particles.Rows[i]["RectTop"]), Width = Convert.ToInt32(particles.Rows[i]["RectWidth"]), Height = Convert.ToInt32(particles.Rows[i]["RectHeight"]) };
+        //        Bitmap bmap = GetBitmapByParticle(FieldImage.Value, rectangle);
+        //        bmap.Tag = new List<string>() { particles.Rows[i]["FieldId"].ToString(), particles.Rows[i]["ParticleId"].ToString(), particles.Rows[i]["TypeId"].ToString(), particles.Rows[i]["XrayId"].ToString() };
+        //        dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
+        //        dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20;
+        //    }
+        //    return bmap;
+        //}
         #endregion