浏览代码

improve the watershed algorithm

gsp 7 月之前
父节点
当前提交
c376bc13a4

+ 3 - 3
Bin/x64/Debug/Config/SysData/OTSProgMgrParam.pmf

@@ -2,11 +2,11 @@
 <XMLData RunMode="ProfessionalMode" SysType="IncA">
   <Member RegName="GenParam" DefaultArea="100" DefaultSampleName="Sample" DefaultShape="0" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="fire-resistant_2" SteelTechnology="0" UseSysSTD="false" />
   <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="3:WaterShed" MatrixStep="50" OverlapParam="0" ParticleSelectionCondition="">
-    <Member RegName="BGGray" end="10" start="0" />
-    <Member RegName="IncArea" end="500" start="20" />
+    <Member RegName="BGGray" end="30" start="0" />
+    <Member RegName="IncArea" end="10000" start="25" />
     <Member RegName="ParticleGray" end="255" start="0" />
   </Member>
-  <Member RegName="ImageScanParam" ImageResolution="4:_1536_1024" SatrtImageMode="1:Snake" ScanImageSpeed="1:meddium" StopMode="0:CoverMode" StopParamArea="10" StopParamFields="100" StopParamMeasTime="360" StopParamParticles="5000" />
+  <Member RegName="ImageScanParam" ImageResolution="4:_1536_1024" SatrtImageMode="1:Snake" ScanImageSpeed="0:low" StopMode="0:CoverMode" StopParamArea="10" StopParamFields="100" StopParamMeasTime="360" StopParamParticles="5000" />
   <Member RegName="StageData" ControlDelay="1000" MinMag="65" scanFieldSize="1270" xAxisDir="0:LEFT_TOWARD" yAxisDir="1:DOWN_TOWARD">
     <Member RegName="XAxis" end="55000" start="-55000" />
     <Member RegName="YAxis" end="55000" start="-55000" />

+ 4 - 0
OTSCPP/OTSImagePro/GreyPeak.cpp

@@ -15,6 +15,10 @@ namespace OTSIMGPROC
 
 				if (pt == GrayPeakType::normalPeak)//normal peak
 				{
+					if (curRange->nextRng == NULL)
+					{
+						break;
+					}
 					curRange = curRange->nextRng;
 					continue;
 				}

+ 8 - 8
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -631,7 +631,7 @@ namespace OTSIMGPROC
 			if (it->first == -1) continue;
 			if (it->first == 0) continue;
 			auto pixelsegs = it->second;
-			COTSParticlePtr newGrain = COTSParticlePtr(new COTSParticle());
+			COTSParticlePtr newsubpart = COTSParticlePtr(new COTSParticle());
 			COTSFeaturePtr newFea = COTSFeaturePtr(new COTSFeature());
 			for (auto pixelseg : pixelsegs)
 			{
@@ -667,12 +667,12 @@ namespace OTSIMGPROC
 				}
 
 			}
-			newGrain->SetFeature(newFea);
+			newsubpart->SetFeature(newFea);
 
 
-			newGrain->CalXRayPos();
+			newsubpart->CalXRayPos();
 
-			CPoint pos = newGrain->GetXRayPos();
+			CPoint pos = newsubpart->GetXRayPos();
 
 			for (auto mp : listMainParticle)
 			{
@@ -689,14 +689,14 @@ namespace OTSIMGPROC
 				mp->SetFieldId(outFldData->GetId());
 				if (mp->IfContain(pos))
 				{
-					CRect rectInSinglefld = newGrain->GetParticleRect();
+					CRect rectInSinglefld = newsubpart->GetParticleRect();
 					CPoint OTSLeftTop = CPoint(leftTop.x + rectInSinglefld.left * a_PixelSize, leftTop.y - rectInSinglefld.top * a_PixelSize);
 					CPoint OTSRightBottom = CPoint(leftTop.x + rectInSinglefld.right * a_PixelSize, leftTop.y - rectInSinglefld.bottom * a_PixelSize);
 
 					COTSRect recInOTSCord = COTSRect(OTSLeftTop, OTSRightBottom);
-					newGrain->SetFieldId(mp->GetFieldId());
-					newGrain->SetOTSRect(recInOTSCord);
-					mp->AddSubParticle(newGrain);
+					newsubpart->SetFieldId(mp->GetFieldId());
+					newsubpart->SetOTSRect(recInOTSCord);
+					mp->AddSubParticle(newsubpart);
 					break;
 				}
 

+ 18 - 28
OTSIncAMeasureApp/10-OTSSplashScreen/OTSSplashScreen_IncA.Designer.cs

@@ -27,10 +27,10 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.label3 = new System.Windows.Forms.Label();
-            this.richTextBox1 = new System.Windows.Forms.RichTextBox();
             this.label4 = new System.Windows.Forms.Label();
             this.richTextBox3 = new System.Windows.Forms.RichTextBox();
             this.label5 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             this.SuspendLayout();
@@ -40,7 +40,7 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.label2.AutoSize = true;
             this.label2.CausesValidation = false;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Font = new System.Drawing.Font("Microsoft YaHei", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.SystemColors.InfoText;
             this.label2.Location = new System.Drawing.Point(668, 188);
             this.label2.Name = "label2";
@@ -54,7 +54,7 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.label1.AutoSize = true;
             this.label1.CausesValidation = false;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Font = new System.Drawing.Font("Microsoft YaHei", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.InfoText;
             this.label1.Location = new System.Drawing.Point(603, 239);
             this.label1.Name = "label1";
@@ -89,7 +89,7 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.label3.AutoSize = true;
             this.label3.BackColor = System.Drawing.Color.Transparent;
             this.label3.CausesValidation = false;
-            this.label3.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Font = new System.Drawing.Font("SimSun", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label3.ForeColor = System.Drawing.SystemColors.HighlightText;
             this.label3.Location = new System.Drawing.Point(1, 4);
             this.label3.Name = "label3";
@@ -97,31 +97,12 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.label3.TabIndex = 6;
             this.label3.Text = "Version : 3.2";
             // 
-            // richTextBox1
-            // 
-            this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-            this.richTextBox1.BackColor = System.Drawing.SystemColors.Menu;
-            this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
-            this.richTextBox1.CausesValidation = false;
-            this.richTextBox1.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.5F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.richTextBox1.ForeColor = System.Drawing.SystemColors.HotTrack;
-            this.richTextBox1.Location = new System.Drawing.Point(11, 466);
-            this.richTextBox1.Margin = new System.Windows.Forms.Padding(2);
-            this.richTextBox1.Name = "richTextBox1";
-            this.richTextBox1.ReadOnly = true;
-            this.richTextBox1.Size = new System.Drawing.Size(78, 19);
-            this.richTextBox1.TabIndex = 7;
-            this.richTextBox1.TabStop = false;
-            this.richTextBox1.Text = "update log";
-            this.richTextBox1.Click += new System.EventHandler(this.richTextBox1_Click);
-            // 
             // label4
             // 
             this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.label4.AutoSize = true;
             this.label4.CausesValidation = false;
-            this.label4.Font = new System.Drawing.Font("微软雅黑", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Font = new System.Drawing.Font("Microsoft YaHei", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label4.ForeColor = System.Drawing.SystemColors.InfoText;
             this.label4.Location = new System.Drawing.Point(559, 296);
             this.label4.Name = "label4";
@@ -151,13 +132,22 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             // 
             this.label5.AutoSize = true;
             this.label5.CausesValidation = false;
-            this.label5.Font = new System.Drawing.Font("宋体", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Font = new System.Drawing.Font("SimSun", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.ForeColor = System.Drawing.SystemColors.Highlight;
             this.label5.Location = new System.Drawing.Point(498, 466);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(251, 20);
             this.label5.TabIndex = 10;
-            this.label5.Text = "Opton Copyright © 2024";
+            this.label5.Text = "Opton Copyright © 2025";
+            // 
+            // label6
+            // 
+            this.label6.Font = new System.Drawing.Font("Microsoft YaHei", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(4, 406);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(448, 40);
+            this.label6.TabIndex = 11;
+            this.label6.Text = "OTS 矿物分析系统(钢铁行业)";
             // 
             // OTSSplashScreen_IncA
             // 
@@ -167,10 +157,10 @@ namespace OTSMeasureApp._10_OTSSplashScreen
             this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.ClientSize = new System.Drawing.Size(761, 491);
+            this.Controls.Add(this.label6);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.richTextBox3);
             this.Controls.Add(this.label4);
-            this.Controls.Add(this.richTextBox1);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.pictureBox2);
             this.Controls.Add(this.pictureBox1);
@@ -202,9 +192,9 @@ namespace OTSMeasureApp._10_OTSSplashScreen
         private System.Windows.Forms.PictureBox pictureBox1;
         private System.Windows.Forms.PictureBox pictureBox2;
         private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.RichTextBox richTextBox1;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.RichTextBox richTextBox3;
         private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label6;
     }
 }

+ 3 - 3
OTSIncAMeasureApp/10-OTSSplashScreen/OTSSplashScreen_IncA.resx

@@ -121,7 +121,7 @@
   <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAMMAAAC3CAYAAACvzOp9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
-        wQAADsEBuJFr7QAAOrtJREFUeF7tfQd4nNWZbjaAuiW5URKSzQ2BQJLdZFNudrMtm5vsvWmbbLClGY1k
+        wAAADsABataJCQAAOrtJREFUeF7tfQd4nNWZbjaAuiW5URKSzQ2BQJLdZFNudrMtm5vsvWmbbLClGY1k
         m246hCRsIKEETEhCAOOq3qsrzVQ3jAslFBuDARsDbtjGsurM/NPe+77nH1kz8sixjY0tdB4/r2c0c/5z
         zv/P937llO98LBaLwcLCIoaPRaNRWFhYRGEtg4VFHJYMFhZxWDJYWMRhyWBhEYclg4VFHJYMFhZxWDJY
         WMRhyWBhEYclg4VFHHYG2sIiDmsZLCzisJbBwiIOaxksLOKwlsHCIg5rGSws4rBksLCIw5LBwiIOSwYL
@@ -378,7 +378,7 @@
   <data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAALgAAAAlCAYAAADxyyNaAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
-        wQAADsEBuJFr7QAACm1JREFUeF7tnH1sVWcdx6fRLNs/00QHAzVukUYTdTr+WNQtJkvUway4jTG26bZI
+        wAAADsABataJCQAACm1JREFUeF7tnH1sVWcdx6fRLNs/00QHAzVukUYTdTr+WNQtJkvUway4jTG26bZI
         kCUucWKWJYoyIhKNTjoGFjZe5KXrygataQeUFTbX0Ta8WTraUaC2hdL2cnvp+nLbe9tejvd3zvO75znn
         fs/7uU3h9pN8k97n/J7fc7h8z7nP2zk3KNPkDfUfXlLmLNqk3Dp/naVmPLBW2Vd3XtS49pk2+HXO2HhK
         uePhjdDMTpp5/ytKT9+wyHRt4tvgD/9ur+HLuOvp7eKIYiinO0bVkevnjnCt0J02pvz/wJq3fLfSPzgq
@@ -473,7 +473,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAA9UFJREFUeF7s3QWcXdW5
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAA9UFJREFUeF7s3QWcXdW5
         NvAz7m6ZjLu7u/tMZiaZmbiHOAQJ8QBJkODu7hAkCVZaatSFut62aKl8vb20FFokged7331mTXZmDpQK
         LQxP+vt329q+9jl75TxZOAAQERERERERERERERERERERERERERER0X+Iy5lERERERERERERERERERERE
         RERERERE9OFwOZOIiIiIiIiIiIiIiIiIiIiIiIiIiIiIPhwuZxIRERERERERERERERERERERERERERHR

+ 2 - 6
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -1042,11 +1042,7 @@ namespace OTSMeasureApp
                 allobj.Add(s.GetSampleGDIObject());
                 allobj.Add(s.GetMeasureGDIObject());
 
-                //foreach (var f in s.GetMeasureFieldGDIObjects())
-                //{
-                //    allobj.Add(f);
-
-                //}
+               
 
 
             }
@@ -2183,7 +2179,7 @@ namespace OTSMeasureApp
                 {
                     e.Graphics.DrawImage(sampleHoleImageBuffer.BSEImage, sampleHoleImageBuffer.GetZoomedRegionF());
                 }
-                    
+                OnPaint(e,m_visualStage.FrameOfHoleGDIObjects);
 
             }
 

+ 8 - 2
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/VisualGDIObjects/CDisplayGDIObject.cs

@@ -256,12 +256,18 @@ namespace OTSMeasureApp
                 PointF startPointF = new PointF(m_RegionF.Left, m_RegionF.Top);
                 PointF endPointF = new PointF(m_RegionF.Right + 2, m_RegionF.Bottom + 2);
                 //绘制样品孔中图像信息
+                //if (BSEImage != null)
+                //{
+                //    Image thumbnail = BSEImage.GetThumbnailImage((int)m_RegionF.Width + 2,(int)m_RegionF.Height + 2, null, IntPtr.Zero);
+                //    e.Graphics.DrawImage(thumbnail, startPointF);/*, startPointF.X, startPointF.Y, endPointF.X - startPointF.X, endPointF.Y - startPointF.Y*/
+
+                //}
                 if (BSEImage != null)
                 {
-                    Image thumbnail = BSEImage.GetThumbnailImage((int)m_RegionF.Width + 2,(int)m_RegionF.Height + 2, null, IntPtr.Zero);
-                    e.Graphics.DrawImage(thumbnail, startPointF);/*, startPointF.X, startPointF.Y, endPointF.X - startPointF.X, endPointF.Y - startPointF.Y*/
+                    e.Graphics.DrawImage(BSEImage, startPointF.X, startPointF.Y, endPointF.X - startPointF.X, endPointF.Y - startPointF.Y);
 
                 }
+
             }
            
            

+ 19 - 10
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -1235,26 +1235,26 @@ namespace OTSMeasureApp
             var knownelements = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().AnalysisElements;
             var eds = EDSController.GetEDSController(GetIWidth(), GetIHeight(), expC, ifautoid, knownelements);
 
-
+            bool r=false;
             //var parts = new List<COTSParticleClr>();
             //parts.Add(selectedPart);
             if (mode == otsdataconst.OTS_X_RAY_SCAN_MODE.PointMode)
             {
-                eds.GetXRayByParts(selectedParts, a_nXRayAQTime, true);
+              r=  eds.GetXRayByParts(selectedParts, a_nXRayAQTime, true);
             }
             else if (mode == otsdataconst.OTS_X_RAY_SCAN_MODE.FeatureMode)
             {
-                eds.GetXRayByFeatures(selectedParts, a_nXRayAQTime, true);
+              r=  eds.GetXRayByFeatures(selectedParts, a_nXRayAQTime, true);
             }
             else if (mode == otsdataconst.OTS_X_RAY_SCAN_MODE.ExpandMode)
             {
-                eds.GetXRayByExpandFeatures(selectedParts, a_nXRayAQTime, true);
+               r= eds.GetXRayByExpandFeatures(selectedParts, a_nXRayAQTime, true);
 
             }
 
             ClassifyParticles(selectedParts);
 
-            return true;
+            return r;
 
         }
         void ClassifyParticles(List<COTSParticleClr> parts)
@@ -1788,15 +1788,24 @@ namespace OTSMeasureApp
 
                 var parts = myFld.GetListAnalysisParticles();
 
-                GetXRayAndElements(a_Milliseconds, parts, mode);
+                if (GetXRayAndElements(a_Milliseconds, parts, mode))
+                {
+                    var colorImg = myFld.GetAnalysisParticleSTDColoredImage();
+                    pictureBox2.Image = colorImg;
+                    ExportScanInfoMenuItem.Enabled = true;
+                    this.Refresh();
+
+                }
+                else
+                {
+                    log.Error("get xray failed");
+                
+                }
 
 
 
 
-                var colorImg = myFld.GetAnalysisParticleSTDColoredImage();
-                pictureBox2.Image = colorImg;
-                ExportScanInfoMenuItem.Enabled = true;
-                this.Refresh();
+               
 
 
 

+ 1 - 1
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -190,7 +190,7 @@ namespace OTSMeasureApp
                         var SystemType = m_ProjParam.GetDefaultParam().SystemTypeId;
                         if (SystemType == OTS_SysType_ID.IncA)
                         {
-                            this.Text += "(Inclusion)";
+                            this.Text += "(矿物分析系统)";
                         }
                         else if (SystemType == OTS_SysType_ID.TCCleannessA)
                         {

+ 3 - 3
OTSIncAMeasureApp/ServiceCenter/CImageHandler.cs

@@ -409,14 +409,14 @@ namespace OTSModelSharp.ServiceCenter
                 }
 
             }
-            //Random c = new Random();
-           
+            Random c = new Random();
+
 
 
             foreach (var p in analysitParts)
             {
 
-                Color cValue = Color.Black;
+                Color cValue = GetRandomColor30(c);
                 foreach (var s in p.GetFeature().GetSegmentsList())
                 {
 

+ 5 - 5
OxfordExtenderWrapper/ExtenderWrapper.cs

@@ -273,7 +273,7 @@ namespace OxfordExtenderWrapper
         const int g_nOxfordControllerProcessTime = 4;
         const int g_nOxfordControllerEnergyRange = 20;
 
-        const int XrayQuantityLimitPerTime = 256;
+        const int XrayQuantityLimitPerTime = 100;
 
         private bool m_bXrayDone = false;
         //电压
@@ -632,18 +632,18 @@ namespace OxfordExtenderWrapper
 
                     return false;
                 }
-
+                Thread.Sleep(2000);
 
             }
 
             int nLast = nSize % XrayQuantityLimitPerTime;
             if (nLast != 0)
             {
-
+               
                 singleGroup.Clear();
                 for (int m = 0; m < nLast; m++)
                 {
-                    singleGroup.Add(a_listPoints[m]);
+                    singleGroup.Add(a_listPoints[XrayQuantityLimitPerTime * nTimes+m]);
                 }
 
                 if (!CollectXrayByPointsOnHardwareLimit(ref singleGroup, a_nXRayAQTime, a_bElementInfo))
@@ -773,7 +773,7 @@ namespace OxfordExtenderWrapper
                 singleGroup.Clear();
                 for (int m = 0; m < nLast; m++)
                 {
-                    singleGroup.Add(a_listFeatures[m]);
+                    singleGroup.Add(a_listFeatures[XrayQuantityLimitPerTime*nTimes+m]);
                 }
 
                 if (!CollectXrayByFeaturesOnHardwareLimit(ref singleGroup, a_nXRayAQTime, a_bElementInfo))