Bladeren bron

修改报告计算视域面积参数

zhangjiaxin 3 jaren geleden
bovenliggende
commit
736227cabe
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 4 2
      OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

+ 4 - 2
OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

@@ -129,8 +129,10 @@ namespace OTSIncAReportGrids
             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]);
-            double filedsArea = Math.Round(scanFieldSize * wide * filedCount, 2);
+            double wide = Convert.ToDouble(ImageResolution.Split('_')[1]);
+            double high = Convert.ToDouble(ImageResolution.Split('_')[2]);
+            double pixelSize = scanFieldSize / wide;
+            double filedsArea = Math.Round(high * wide * pixelSize* pixelSize*  filedCount, 2);
             int particleArea = fielddata.GetparticleArea();
 
             double ratio = particleArea / filedsArea;