From c2e78e3b0c11026a6374a8dac05c94f65b8c54a6 Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期二, 30 六月 2020 16:22:13 +0800
Subject: [PATCH] 添加IImageSet接口,修改CameraBase图片保存操作。添加Gocator驱动的图片保存操作,gocator图片使用HImage保存

---
 src/Bro.Process/ProcessControl.cs |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/Bro.Process/ProcessControl.cs b/src/Bro.Process/ProcessControl.cs
index 1c146c5..474d0c0 100644
--- a/src/Bro.Process/ProcessControl.cs
+++ b/src/Bro.Process/ProcessControl.cs
@@ -398,7 +398,7 @@
         #endregion
 
         #region Halcon绠楀瓙璁剧疆
-        private void InitialHalconTool()
+        protected virtual void InitialHalconTool()
         {
             foreach (HDevEngineTool tool in _halconToolDict.Values)
             {
@@ -413,22 +413,27 @@
                 {
                     toolPath.GetHalconToolPathList().ForEach(path =>
                     {
-                        if (!string.IsNullOrWhiteSpace(path))
-                        {
-                            string directoryPath = Path.GetDirectoryName(path);
-                            string fileName = Path.GetFileNameWithoutExtension(path);
-
-                            HDevEngineTool tool = new HDevEngineTool(directoryPath);
-                            tool.LoadProcedure(fileName);
-
-                            //浣跨敤鈥渱鈥濅綔涓洪棿闅旂
-                            _halconToolDict[monitorSet.Id + "|" + path] = tool;
-                        }
+                        LoadHalconTool(path, monitorSet.Id);
                     });
                 }
             });
         }
 
+        protected void LoadHalconTool(string algorithemPath, string prefix)
+        {
+            if (!string.IsNullOrWhiteSpace(algorithemPath))
+            {
+                string directoryPath = Path.GetDirectoryName(algorithemPath);
+                string fileName = Path.GetFileNameWithoutExtension(algorithemPath);
+
+                HDevEngineTool tool = new HDevEngineTool(directoryPath);
+                tool.LoadProcedure(fileName);
+
+                //浣跨敤鈥渱鈥濅綔涓洪棿闅旂
+                _halconToolDict[prefix + "|" + algorithemPath] = tool;
+            }
+        }
+
         /// <summary>
         /// 鑾峰彇棰勫厛杞藉叆鐨凥alcon绠楁硶
         /// </summary>

--
Gitblit v1.8.0