Browse Source

单晶颗粒添加保留小数位数和底边距离控制功能

liu 2 years ago
parent
commit
48b3b0c8bf

+ 6 - 2
Adjust/Battery.cs

@@ -136,7 +136,8 @@ namespace PaintDotNet.Adjust
         public static int maxRadius = 52;
         //去边界
         public static int boundary = 0;
-
+        //去底边
+        public static double borderBottom = 0;
         //忽略开裂球
         public static List<PointF> CreackBallPointFs = new List<PointF>();
         //设为开裂球
@@ -463,6 +464,9 @@ namespace PaintDotNet.Adjust
                     case "isJu":
                         isJu = (bool)args.Value;
                         break;
+                    case "borderBottom":
+                        borderBottom = (int)args.Value;
+                        break;
                     default:
                         break;
                 }
@@ -2615,7 +2619,7 @@ namespace PaintDotNet.Adjust
                     }
                 }
                 //边缘
-                if (x < border || x + width > src.Cols - border || y < border || y + height > src.Rows - border)
+                if (x < border || x + width > src.Cols - border || y < border || y + height > src.Rows - -border - borderBottom)
                 {
                     keyValuePairs.Add(h, 1);
                 }

+ 79 - 8
DedicatedAnalysis/Battery/BatteryCrystalDialog.Designer.cs

@@ -85,8 +85,12 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             ckMax = new CheckBox();
             ckHW = new CheckBox();
             ckArea = new CheckBox();
+            ckBottom = new CheckBox();
+            ckNum = new CheckBox();
             numericHW = new NumericUpDown();
             numericArea = new NumericUpDown();
+            numericBottom = new NumericUpDown();
+            numericNum = new NumericUpDown();
             ckChanged = new CheckBox();
             ckDis = new CheckBox();
             ckJu = new CheckBox();
@@ -347,9 +351,13 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             this.groupBox11.Controls.Add(this.ckMax);
             this.groupBox11.Controls.Add(this.numericMax);
             this.groupBox11.Controls.Add(this.ckHW);
+            this.groupBox11.Controls.Add(this.ckNum);
+            this.groupBox11.Controls.Add(this.ckBottom);
             this.groupBox11.Controls.Add(this.numericHW);
             this.groupBox11.Controls.Add(this.ckArea);
             this.groupBox11.Controls.Add(this.numericArea);
+            this.groupBox11.Controls.Add(this.numericBottom);
+            this.groupBox11.Controls.Add(this.numericNum);
             this.groupBox11.Controls.Add(btnReDrw);
 
             this.groupBox11.Controls.Add(this.ckChanged);
@@ -367,7 +375,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // 
             this.ckMin.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.ckMin.AutoSize = true;
-            this.ckMin.Location = new System.Drawing.Point(30, 21);
+            this.ckMin.Location = new System.Drawing.Point(30, 13);
             this.ckMin.Name = "ckMin";
             this.ckMin.Size = new System.Drawing.Size(70, 21);
             this.ckMin.TabIndex = 8;
@@ -379,7 +387,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // numericUpDown1
             // 
             this.numericUpDown11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.numericUpDown11.Location = new System.Drawing.Point(100, 18);
+            this.numericUpDown11.Location = new System.Drawing.Point(100, 10);
             this.numericUpDown11.Maximum = new decimal(2000);
             this.numericUpDown11.Minimum = 0;
             this.numericUpDown11.DecimalPlaces =2;
@@ -395,7 +403,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // 
             this.ckMax.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.ckMax.AutoSize = true;
-            this.ckMax.Location = new System.Drawing.Point(180, 21);
+            this.ckMax.Location = new System.Drawing.Point(180, 13);
             this.ckMax.Name = "ckMax";
             this.ckMax.Size = new System.Drawing.Size(70, 21);
             this.ckMax.TabIndex = 8;
@@ -406,7 +414,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // numericMax
             // 
             this.numericMax.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.numericMax.Location = new System.Drawing.Point(250, 18);
+            this.numericMax.Location = new System.Drawing.Point(250, 10);
             this.numericMax.Maximum = new decimal(new int[] {
             300,
             0,
@@ -423,7 +431,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // 
             this.ckHW.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.ckHW.AutoSize = true;
-            this.ckHW.Location = new System.Drawing.Point(30, 45);
+            this.ckHW.Location = new System.Drawing.Point(30, 33);
             this.ckHW.Name = "ckHW";
             this.ckHW.Size = new System.Drawing.Size(70, 21);
             this.ckHW.TabIndex = 8;
@@ -435,7 +443,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // numericUpDown1
             // 
             this.numericHW.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.numericHW.Location = new System.Drawing.Point(100, 42);
+            this.numericHW.Location = new System.Drawing.Point(100, 30);
             this.numericHW.Maximum = new decimal(100);
             this.numericHW.Minimum = new decimal(0);
             this.numericHW.Name = "numericHW";
@@ -450,7 +458,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // 
             this.ckArea.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.ckArea.AutoSize = true;
-            this.ckArea.Location = new System.Drawing.Point(180, 45);
+            this.ckArea.Location = new System.Drawing.Point(180, 33);
             this.ckArea.Name = "ckArea";
             this.ckArea.Size = new System.Drawing.Size(70, 21);
             this.ckArea.TabIndex = 8;
@@ -461,7 +469,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             // numericArea
             // 
             this.numericArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.numericArea.Location = new System.Drawing.Point(250, 42);
+            this.numericArea.Location = new System.Drawing.Point(250, 30);
             this.numericArea.Maximum = new decimal(1);
             this.numericArea.Minimum = 0;
             this.numericArea.Name = "numericArea";
@@ -470,6 +478,64 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             this.numericArea.DecimalPlaces = 2;
             this.numericArea.Increment = new decimal(0.01);
             this.numericArea.Value = new decimal(0.55);
+
+
+
+            // 
+            // ckBottom
+            // 
+            this.ckBottom.Anchor = System.Windows.Forms.AnchorStyles.Right;
+            this.ckBottom.AutoSize = true;
+            this.ckBottom.Location = new System.Drawing.Point(30, 53);
+            this.ckBottom.Name = "ckBottom";
+            this.ckBottom.Size = new System.Drawing.Size(70, 21);
+            this.ckBottom.TabIndex = 8;
+            this.ckBottom.Text = "底边距离";
+            this.ckBottom.UseVisualStyleBackColor = true;
+            this.ckBottom.Checked = true;
+
+            // 
+            // numericBottom
+            // 
+            this.numericBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.numericBottom.Location = new System.Drawing.Point(100, 50);
+            this.numericBottom.Maximum = new decimal(1000);
+            this.numericBottom.Minimum = new decimal(0);
+            this.numericBottom.Name = "numericBottom";
+            this.numericBottom.Size = new System.Drawing.Size(60, 53);
+            this.numericBottom.TabIndex = 7;
+            this.numericBottom.Value = new decimal(0);
+            this.numericBottom.DecimalPlaces = 0;
+            this.numericBottom.Increment = new decimal(1);
+
+            // 
+            // ckNum
+            // 
+            this.ckNum.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.ckNum.AutoSize = true;
+            this.ckNum.Location = new System.Drawing.Point(180, 53);
+            this.ckNum.Name = "ckNum";
+            this.ckNum.Size = new System.Drawing.Size(70, 21);
+            this.ckNum.TabIndex = 8;
+            this.ckNum.Text = "保留小数";
+            this.ckNum.UseVisualStyleBackColor = true;
+            this.ckNum.Checked = true;
+            // 
+            // numericNum
+            // 
+            this.numericNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.numericNum.Location = new System.Drawing.Point(250, 50);
+            this.numericNum.Maximum = new decimal(5);
+            this.numericNum.Minimum = 0;
+            this.numericNum.Name = "numericNum";
+            this.numericNum.Size = new System.Drawing.Size(60, 21);
+            this.numericNum.TabIndex = 7;
+            this.numericNum.DecimalPlaces = 0;
+            this.numericNum.Increment = new decimal(1);
+            this.numericNum.Value = new decimal(2);
+
+
+
             // 
             // 原图
             // 
@@ -761,10 +827,15 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
         private CheckBox ckMax;
         private CheckBox ckHW;
         private CheckBox ckArea;
+        private CheckBox ckBottom;
+        private CheckBox ckNum;
         private NumericUpDown numericUpDown11;
         private NumericUpDown numericMax;
         private NumericUpDown numericHW;
         private NumericUpDown numericArea;
+        private NumericUpDown numericBottom;
+        private NumericUpDown numericNum;
+
 
         private GroupBox groupBox10;
         private GroupBox groupBox9;

+ 54 - 22
DedicatedAnalysis/Battery/BatteryCrystalDialog.cs

@@ -236,7 +236,8 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             numericMax.Value = binaryClass.border;
             numericHW.Value = Convert.ToDecimal(binaryClass.HW);
             numericArea.Value = Convert.ToDecimal(binaryClass.AreaRatio);
-
+            numericBottom.Value = binaryClass.borderBottom;
+            numericNum.Value = binaryClass.numDecimals;
             string checkstate = binaryClass.CheckState.ToString();
             if (checkstate.Length == 5)
             {
@@ -245,6 +246,15 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
                 ckHW.Checked = checkstate.Substring(3, 1) == "1" ? true : false;
                 ckArea.Checked = checkstate.Substring(4, 1) == "1" ? true : false;
             }
+            else if (checkstate.Length == 7)
+            {
+                ckMin.Checked = checkstate.Substring(1, 1) == "1" ? true : false;
+                ckMax.Checked = checkstate.Substring(2, 1) == "1" ? true : false;
+                ckHW.Checked = checkstate.Substring(3, 1) == "1" ? true : false;
+                ckArea.Checked = checkstate.Substring(4, 1) == "1" ? true : false;
+                ckBottom.Checked = checkstate.Substring(5, 1) == "1" ? true : false;
+                ckNum.Checked = checkstate.Substring(6, 1) == "1" ? true : false;
+            }
 
 
             InitCommonButtonEvent();
@@ -281,7 +291,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
 
         private void InclusionsStandardDialog_FormClosing(object sender, FormClosingEventArgs e)
         {
-            int check = 10000;
+            int check = 1000000;
             double minpoint = Convert.ToDouble(numericUpDown11.Value);
             int minpointInt = ckMin.Checked ? 1 : 0;
 
@@ -294,13 +304,20 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             double AreaRatio = Convert.ToDouble(numericArea.Value);
             int AreaRatioInt = ckArea.Checked ? 1 : 0;
 
-         
-            check = check + minpointInt * 1000 + borderInt * 100 + HWInt * 10 + AreaRatioInt;
+            int bottom = Convert.ToInt32(numericBottom.Value);
+            int bottomInt = ckBottom.Checked ? 1 : 0;
+
+            int size = Convert.ToInt32(numericNum.Value);
+            int sizeInt = ckNum.Checked ? 1 : 0;
+
+            check = check + minpointInt * 100000 + borderInt * 10000 + HWInt * 1000 + AreaRatioInt * 100 + bottomInt * 10 + sizeInt;
             List<int> paramsList = new List<int>() {
                   Convert.ToInt32(minpoint * 100)
                 , Convert.ToInt32(border * 100)
                 , Convert.ToInt32(HW * 100)
-                , Convert.ToInt32(AreaRatio * 100),check};
+               , Convert.ToInt32(AreaRatio * 100)
+                , Convert.ToInt32(bottom * 100)
+                , Convert.ToInt32(size),check };
             binaryClass.saveParams(paramsList);
         }
 
@@ -600,7 +617,12 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
                 if (!ckArea.Checked)
                     AreaRatio = 0.01;
                 binaryClass.AreaRatio = AreaRatio;
-                
+
+                int bottom = Convert.ToInt32(numericBottom.Value);
+                if (!ckBottom.Checked)
+                    bottom = 0;
+                binaryClass.borderBottom = bottom;
+
                 //二值化集成4
                 binaryClass.listView1_SelectedIndexChanged(this.bitmap);
                // binaryClass.bcDefault();
@@ -855,6 +877,10 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             List<double> diameterPI = new List<double>() { };
             List<double> diameter = new List<double>(){ };
             List<double> diameterMax = new List<double>() { };
+
+            //保留小数位数
+            int numDec =Convert.ToInt32( numericNum.Value);
+
             for (int i = 0; i < dataList.Count; i++)
             {
                
@@ -878,11 +904,11 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
                 diameterMax.Add(maxD * unitLength);
 
                 double circle= Convert.ToDouble(dataList[i][8])*0.001;
-                dataGridView1.Rows[newPo].Cells[2].Value=  Math.Round(dd, 2).ToString();
+                dataGridView1.Rows[newPo].Cells[2].Value=  Math.Round(dd, numDec).ToString();
                 dataGridView1.Rows[newPo].Cells[3].Value = dataList[i][5];
-                dataGridView1.Rows[newPo].Cells[4].Value = Math.Round(maxD * unitLength, 2).ToString();
-                dataGridView1.Rows[newPo].Cells[5].Value = Math.Round(minD * unitLength, 2).ToString();
-                dataGridView1.Rows[newPo].Cells[6].Value = Math.Round(r, 2).ToString();
+                dataGridView1.Rows[newPo].Cells[4].Value = Math.Round(maxD * unitLength, numDec).ToString();
+                dataGridView1.Rows[newPo].Cells[5].Value = Math.Round(minD * unitLength, numDec).ToString();
+                dataGridView1.Rows[newPo].Cells[6].Value = Math.Round(r, numDec).ToString();
             }
             diameterMax.Sort();
 
@@ -911,7 +937,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             int newRow = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow].Cells[1].Value = "平均值";
-            dataGridView2.Rows[newRow].Cells[2].Value = Math.Round(total, 2).ToString();
+            dataGridView2.Rows[newRow].Cells[2].Value = Math.Round(total, numDec).ToString();
 
             //int newRow1 = dataGridView2.Rows.Add();
             //dataGridView2.Rows[newRow1].Cells[0].Value = (ind++).ToString();
@@ -931,7 +957,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             int newRow7 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow7].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow7].Cells[1].Value = "拟圆直径";
-            dataGridView2.Rows[newRow7].Cells[2].Value = Math.Round(advR, 2).ToString();
+            dataGridView2.Rows[newRow7].Cells[2].Value = Math.Round(advR, numDec).ToString();
 
             int count = diameter.Count;
             int d1= Convert.ToInt32(count * 0.01);
@@ -952,42 +978,42 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             int newRowMin = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRowMin].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRowMin].Cells[1].Value = "Dmin";
-            dataGridView2.Rows[newRowMin].Cells[2].Value = Math.Round(diameter[0], 2).ToString();
+            dataGridView2.Rows[newRowMin].Cells[2].Value = Math.Round(diameter[0], numDec).ToString();
 
 
             int newRowd1 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRowd1].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRowd1].Cells[1].Value = "D1";
-            dataGridView2.Rows[newRowd1].Cells[2].Value = Math.Round(diameter[d1], 2).ToString();
+            dataGridView2.Rows[newRowd1].Cells[2].Value = Math.Round(diameter[d1], numDec).ToString();
             int newRow25 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow25].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow25].Cells[1].Value = "D5";
-            dataGridView2.Rows[newRow25].Cells[2].Value = Math.Round(diameter[d5], 2).ToString();
+            dataGridView2.Rows[newRow25].Cells[2].Value = Math.Round(diameter[d5], numDec).ToString();
             int newRow3 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow3].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow3].Cells[1].Value = "D10";
-            dataGridView2.Rows[newRow3].Cells[2].Value = Math.Round(diameter[d10], 2).ToString();
+            dataGridView2.Rows[newRow3].Cells[2].Value = Math.Round(diameter[d10], numDec).ToString();
             int newRow4 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow4].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow4].Cells[1].Value = "D50";
-            dataGridView2.Rows[newRow4].Cells[2].Value = Math.Round(diameter[d50], 2).ToString();
+            dataGridView2.Rows[newRow4].Cells[2].Value = Math.Round(diameter[d50], numDec).ToString();
             int newRow5 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow5].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow5].Cells[1].Value = "D90";
-            dataGridView2.Rows[newRow5].Cells[2].Value = Math.Round(diameter[d90], 2).ToString();
+            dataGridView2.Rows[newRow5].Cells[2].Value = Math.Round(diameter[d90], numDec).ToString();
             int newRow6 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRow6].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRow6].Cells[1].Value = "D95";
-            dataGridView2.Rows[newRow6].Cells[2].Value = Math.Round(diameter[d95], 2).ToString();
+            dataGridView2.Rows[newRow6].Cells[2].Value = Math.Round(diameter[d95], numDec).ToString();
             int newRowd99 = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRowd99].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRowd99].Cells[1].Value = "D99";
-            dataGridView2.Rows[newRowd99].Cells[2].Value = Math.Round(diameter[d99], 2).ToString();
+            dataGridView2.Rows[newRowd99].Cells[2].Value = Math.Round(diameter[d99], numDec).ToString();
 
             int newRowMax = dataGridView2.Rows.Add();
             dataGridView2.Rows[newRowMax].Cells[0].Value = (ind++).ToString();
             dataGridView2.Rows[newRowMax].Cells[1].Value = "Dmax";
-            dataGridView2.Rows[newRowMax].Cells[2].Value = Math.Round(diameter[diameter.Count - 1], 2).ToString();
+            dataGridView2.Rows[newRowMax].Cells[2].Value = Math.Round(diameter[diameter.Count - 1], numDec).ToString();
         }
         /// <summary>
         /// 准备用来处理单个颗粒的选中事件
@@ -1215,6 +1241,10 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             if (!ckArea.Checked)
                 AreaRatio = 0.01;
             binaryClass.AreaRatio = AreaRatio;
+            int bottom = Convert.ToInt32(numericBottom.Value);
+            if (!ckBottom.Checked)
+                bottom = 0;
+            binaryClass.borderBottom = bottom;
             List<List<int>> CircleDate = binaryClass.ForgetCrystal(minpoint);
 
             bindGrid(CircleDate);
@@ -1660,6 +1690,8 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             {
                 return;
             }
+            //保留小数位数
+            int numDec = Convert.ToInt32(numericNum.Value);
             string name = this.listView1.FocusedItem.Name.Substring(0, this.listView1.FocusedItem.Name.LastIndexOf('.')) ;
             SaveFileDialog exe = new SaveFileDialog();
             exe.Filter = "Execl files (*.xlsx)|*.xlsx";
@@ -1803,7 +1835,7 @@ namespace PaintDotNet.DedicatedAnalysis.Battery
             for (int r = 0; r < this.dataGridView2.Rows.Count; r++)
             {
                 dataRowName[r + 1] = names[r];
-                dataRowValue[r + 1] = Math.Round(values[r], 2).ToString();
+                dataRowValue[r + 1] = Math.Round(values[r], numDec).ToString();
                 dataRowNone[r + 1] = "";
             }
             dtb1.Rows.Add(dataRowName);

+ 12 - 1
DedicatedAnalysis/Battery/BinaryClassForB.cs

@@ -141,6 +141,10 @@ namespace PaintDotNet
         public double HW { set; get; }
         //面积率
         public double AreaRatio { set; get; }
+        //底边区域
+        public int borderBottom { set; get; }
+        //保留小数位数
+        public int numDecimals { set; get; }
         //筛选条件
         public int CheckState { set; get; }
         //是否画测距
@@ -861,6 +865,7 @@ namespace PaintDotNet
                             action.Lists.Add(new Args() { Key = "imageType", Value = 12 });
                             action.Lists.Add(new Args() { Key = "SelPointFs", Value = -1 });
                             action.Lists.Add(new Args() { Key = "pointsize", Value = pointsize });
+                            action.Lists.Add(new Args() { Key = "borderBottom", Value = borderBottom });
                             action.Lists.Add(new Args() { Key = "Micron", Value = unitLength });
                             action.Lists.Add(new Args() { Key = "border", Value = border });
                             action.Lists.Add(new Args() { Key = "HW", Value = HW });
@@ -1670,6 +1675,9 @@ namespace PaintDotNet
                 HW = Convert.ToDouble(binaryExtractionModel.ColorTwoStart) / 100;
                 AreaRatio = Convert.ToDouble(binaryExtractionModel.ColorTwoEnd) / 100;
                 CheckState = binaryExtractionModel.ColorThreeStart;
+
+                borderBottom = binaryExtractionModel.ColorThreeEnd / 100;
+                numDecimals = Convert.ToInt32(binaryExtractionModel.DebrisAreaStart);
             }
             if (imageType == 4)
             {
@@ -1723,7 +1731,9 @@ namespace PaintDotNet
             this.binaryExtractionModel.ColorOneEnd = paramsList[1];
             this.binaryExtractionModel.ColorTwoStart = paramsList[2];
             this.binaryExtractionModel.ColorTwoEnd = paramsList[3];
-            this.binaryExtractionModel.ColorThreeStart = paramsList[4];
+            this.binaryExtractionModel.ColorThreeEnd = paramsList[4];
+            this.binaryExtractionModel.ColorThreeStart = paramsList[6];
+            this.binaryExtractionModel.DebrisAreaStart = paramsList[5];
             string xmlFilePath = Application.StartupPath + "\\Config\\" + Startup.instance.SettingPrefix + "\\BinaryConfig\\Default_" + this.menuId + ".xml";
             string userInfoXml = XmlSerializeHelper.XmlSerialize<BinaryExtractionModel>(this.binaryExtractionModel);
             FileOperationHelper.WriteStringToFile(userInfoXml, xmlFilePath, System.IO.FileMode.Create);
@@ -3681,6 +3691,7 @@ namespace PaintDotNet
                                   action.Lists.Add(new Args() { Key = "SelPointFs", Value = -1 });
                                   action.Lists.Add(new Args() { Key = "imageTypes", Value = 12 });
                                   action.Lists.Add(new Args() { Key = "pointsize", Value = pointsize });
+                                  action.Lists.Add(new Args() { Key = "borderBottom", Value = borderBottom });
                                   action.Lists.Add(new Args() { Key = "border", Value = border });
                                   action.Lists.Add(new Args() { Key = "HW", Value = HW });
                                   action.Lists.Add(new Args() { Key = "AreaRatio", Value = AreaRatio });

+ 3 - 0
Metis.csproj

@@ -1872,6 +1872,9 @@
     <EmbeddedResource Include="AutoAnalysis\SampleStageManageDialog.resx">
       <DependentUpon>SampleStageManageDialog.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="DedicatedAnalysis\Battery\BatteryCrystalDialog.resx">
+      <DependentUpon>BatteryCrystalDialog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="DedicatedAnalysis\Battery\BatterySectionPorosityDialog.resx">
       <DependentUpon>BatterySectionPorosityDialog.cs</DependentUpon>
     </EmbeddedResource>