|
@@ -2,6 +2,7 @@
|
|
|
using OpenCvSharp.Extensions;
|
|
|
using OTSCommon.DBOperate.Model;
|
|
|
using OTSIncAReportApp._1_UI.Control_Graph.Controls;
|
|
|
+using OTSIncAReportApp.DataOperation.DataAccess;
|
|
|
using OTSIncAReportApp.OTSRstMgrFunction;
|
|
|
using OTSIncAReportGraph;
|
|
|
using OTSIncAReportGraph.Class;
|
|
@@ -12,6 +13,7 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
|
+using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
@@ -292,7 +294,13 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
}
|
|
|
private DataTable ParticleDataIntegration(DataTable ParticleAll,DataTable ParticleClass)
|
|
|
{
|
|
|
- DataTable dt = ParticleClass.Copy();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ double totalArea = m_list_allDfield[0].OriginalImage.Height * pixelSize * m_list_allDfield[0].OriginalImage.Width * pixelSize * m_list_allDfield.Count;
|
|
|
+
|
|
|
+
|
|
|
+ DataTable dt = ParticleClass.Copy();
|
|
|
dt.Columns.Add("Area", typeof(float));
|
|
|
dt.Columns.Add("Percentage");
|
|
|
dt.Columns.Add("Color");
|
|
@@ -315,8 +323,9 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
}
|
|
|
}
|
|
|
dt.Rows[i]["Area"] = ParticleArea;
|
|
|
- dt.Rows[i]["Percentage"] = ParameterNormalization(ParticleAreaTotal, ParticleArea);
|
|
|
- dt.Rows[i]["Color"] = ParticleColer;
|
|
|
+ dt.Rows[i]["Percentage"] = ParameterNormalization(totalArea, ParticleArea);
|
|
|
+ //dt.Rows[i]["Percentage"] = ParameterNormalization(ParticleAreaTotal, ParticleArea);
|
|
|
+ dt.Rows[i]["Color"] = ParticleColer;
|
|
|
}
|
|
|
return dt;
|
|
|
}
|
|
@@ -337,7 +346,7 @@ namespace OTSIncAReportApp._3_ServiceCenter
|
|
|
else
|
|
|
{
|
|
|
|
|
|
- return Math.Round(ColVal, 2).ToString();
|
|
|
+ return Math.Round(ColVal, 6).ToString();
|
|
|
}
|
|
|
|
|
|
}
|