فهرست منبع

optimize gb calculate.

gsp 2 سال پیش
والد
کامیت
b4ff5a3b33

+ 0 - 2
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -1,10 +1,8 @@
 #pragma once
 #include "stdafx.h"
- 
 #include <opencv2/core/core.hpp>  
 #include <opencv2/highgui/highgui.hpp> 
 #include <opencv2/opencv.hpp>
-
 #include "OTSImageProcess.h"
 #include "OTSImageProcessParam.h"
 #include <OTSFieldData.h>

+ 3 - 3
OTSCPP/OTSRptCalculate/GBCal/GBFieldData.cpp

@@ -285,7 +285,7 @@ namespace OTSGBCalculate
 			}
 			auto w = pParticle->GetDMin();
 		
-			if (w == 0)
+			if (w == 0 || w<2)
 			{
 				continue;
 			}
@@ -535,7 +535,7 @@ namespace OTSGBCalculate
 			//check the denominator is zero or not
 			auto w = pParticle->GetDMin();
 
-			if (w == 0)
+			if (w == 0|| w<2)
 			{
 				continue;
 			}
@@ -708,7 +708,7 @@ namespace OTSGBCalculate
 			}
 			auto w = pParticle->GetDMin();
 
-			if (w == 0)
+			if (w == 0||w<2)
 			{
 				continue;
 			}

+ 1 - 0
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -358,6 +358,7 @@ namespace OTSIncAReportGraph.Controls
                 this.control_Ruler1.Location = new Point(10, MyPrimaryScreen.WorkingArea.Height - 300);
                 this.control_Ruler1.Visible = true;
                 this.control_Ruler1.SetValue(m_f_ruler_size, m_pixelSize);
+                this.control_Ruler1.ShowString = Convert.ToInt32(100).ToString() + "μm";
             }
            
 

+ 4 - 28
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_Ruler.cs

@@ -93,32 +93,8 @@ namespace OTSIncAReportGraph.Controls
         #endregion
 
         #region 设置控制显示部份
-        /// <summary>
-        /// 设置当前标尺显示的值,自动计算其显示的文字及宽度
-        /// </summary>
-        public void SetValue(double in_value)
-        {
-            this.m_f_value = in_value;
-            this.RulerWidth = Convert.ToInt32(in_value);
-
-            //写死缩放逻辑
-            if (this.Width > 100)
-            {
-                m_bs = (float)in_value / 100;
-                for (int i = 0; i < 100; i++)
-                {
-                    if (m_bs > i && m_bs <= (i + 1))
-                    {
-                        m_bs = i + 1;
-                    }
-                }
-
-                this.Width = Convert.ToInt32(in_value / m_bs) + 20; //有20的宽度是边,所以补上
-
-                //修改显示文字
-                m_showstring = Convert.ToInt32(100 / m_bs).ToString() + "μm";
-            }
-        }
+     
+      
 
 
         /// <summary>
@@ -130,8 +106,8 @@ namespace OTSIncAReportGraph.Controls
         {
             this.m_f_value = in_width;
             this.RulerWidth = Convert.ToInt32(in_width);
-            //显示信息
-            m_showstring = Convert.ToInt32(in_width * in_onepixel_size).ToString() + "μm";
+           
+           
         }
 
         /// <summary>