Explorar o código

修改颗粒成分总面积不准确的问题

CXS %!s(int64=3) %!d(string=hai) anos
pai
achega
b5590fbe21

+ 0 - 1
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -154,7 +154,6 @@ namespace OTSMeasureApp
         {
             try
             {
-
                 //try
                 //{
                 //    SenseShield.DogDecrypting.decrypting(101);//参数为许可号

+ 8 - 4
OTSIncAReportApp/1-UI/Control_Grids/CompositionDistributionGrid.cs

@@ -1,4 +1,5 @@
-using OTSIncAReportApp.OTSSampleReportInfo;
+using OTSIncAReportApp.DataOperation.DataAccess;
+using OTSIncAReportApp.OTSSampleReportInfo;
 using OTSIncAReportApp.SysMgrTools;
 using OTSIncAReportGraph.Class;
 using System;
@@ -187,14 +188,17 @@ namespace OTSIncAReportGrids
             }
             else
             {
+                FieldData fielddata = new FieldData(path);
                 Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"]);
                 Dictionary<string, object> semDataMsr = (Dictionary<string, object>)sampleMembers["SEMDataMsr"];
                 double scanFieldSize = Convert.ToDouble(semDataMsr["ScanFieldSize"]);
                 Dictionary<string, object> imageScanParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageScanParam"];
                 string ImageResolution = imageScanParam["ImageResolution"].ToString();
-                double wide = Convert.ToDouble(ImageResolution.Split('_')[2]);
-                int filedCount = Convert.ToInt32(semDataMsr["TotalFields"]);
-                totalArea = scanFieldSize * wide * filedCount;
+                double wide = Convert.ToDouble(ImageResolution.Split('_')[1]);
+                double high = Convert.ToDouble(ImageResolution.Split('_')[2]);
+                double pixelSize = scanFieldSize / wide;
+                int filedCount = fielddata.GetFiledCount();
+                totalArea = high * pixelSize*wide* pixelSize * filedCount;
                 dt = particledata.GetParticleListByIncA(po);
             }