ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

【机器视觉】 dev_open_tool算子

2021-06-17 21:03:17  阅读:249  来源: 互联网

标签:对话框 assistant tool dev open page


00. 目录

文章目录

01. 概述

dev_open_tool - 打开HDevelop工具,非模态对话框或助手。

02. 签名

dev_open_tool( : : ToolName, Row, Column, Width, Height, GenParamName, GenParamValue : ToolId)

03. 描述

dev_open_tool打开一个HDevelop工具,一个非模态对话框或者助手。 参数ToolName含有要打开的工具的名称。 这个算子返回刚创建的工具的ToolId,这个ToolId可以使用像dev_set_tool_geometry,dev_show_tool,dev_close_tool这样的算子用于寻址一个特定的工具。 打开的工具会自动激活。

对于ToolName为’halcon_news’,返回一个空的ToolId,因为这只是查看新闻网页页面。

通过GenParamNames和GenParamValues,可以指定显示哪个页面和更多功能,功能见下文。 GenParamNames和GenParamValues是可选的。 如果它们设置为[],则工具将以默认设置打开。

此算子可以支持以下工具:

ToolNameMain Windows
‘graphics_window’图形窗口
‘operator_window’算子窗口
‘program_listing’程序列表
‘variable_view’变量窗口
ToolNameAssistants
‘calibration_assistant’相机标定助手
‘image_acquisition_assistant’图像采集助手
‘matching_assistant’匹配助手
‘measure1d_assistant’一维测量助手
‘ocr_assistant’OCR助手
ToolNameTools
‘call_stack’调用堆栈
‘feature_histogram’特征直方图
‘feature_inspection’特征检测
‘gray_histogram’灰度直方图
‘line_profile’轮廓线
‘zoom_window’缩放窗口
‘ocr_training_file_browser’OCR训练文件浏览器
ToolNameDialogs
‘browse_examples_dialog’浏览示例对话框
‘create_procedure_dialog’创建程序对话框
‘edit_procedure_interface_dialog’编辑程序接口对话框
‘find_replace_dialog’查找替换对话框
‘output_console’输出控制台
‘program_line_view’程序行视图
‘breakpoints_dialog’程序行视图/断点
‘bookmarks_dialog’程序行视图/书签
‘invalid_lines_dialog’程序行视图/无效行
‘visualization_parameters_dialog’可视化参数对话框
‘help’帮助浏览器
‘preferences’参数对话框
‘halcon_news’HALCON新闻网站

以下工具可用GenParamNames和GenParamValues来设置更多细节:

’calibration_assistant’ - 相机标定助手:

‘page’:

要显示的页面。

ValuePage
‘setup’安装
‘calibration’标定
‘results’结果
‘code_generation’代码生成

例如:dev_open_tool(‘calibration_assistant’,…,‘page’,‘results’,…)打开标定助手并显示结果标签卡。

’image_acquisition_assistant’ - 图像采集助手:

‘page’:

要显示的页面。

ValuePage
‘source’资源
‘connection’连接
‘parameters’参数
‘code_generation’代码生成

例如:dev_open_tool(‘image_acquisition’,…,‘page’,‘source’,…)打开图像采集助手并显示资源页面。

’matching_assistant’ - 匹配助手:

‘page’:

要显示的页面。

ValuePage
‘model_creation’创建
‘model_parameter’参数
‘model_use’应用
‘inspect’检测
‘code_generation’代码生成

例如:dev_open_tool(‘matching_assistant’,…,‘page’,‘inspect’,…)打开匹配助手并显示”检测"标签卡。

’measure1d_assistant’ - 测量助手:

‘page’:

要显示的页面。

ValuePage
‘input’输入
‘edges’边缘
‘fuzzy’模糊
‘results’结果
‘code_generation’代码生成

例如:dev_open_tool(‘measure1d_assistant’,…,‘page’,‘edges’,…)打开测量助手并显示“边缘”标签卡。

’program_line_view’: - 程序行视图对话框

“page”:

要显示的页面。

ValuePage
‘invalid_lines’无效行
‘find_all’查找所有
‘breakpoints’断点
‘bookmarks’书签

例如:dev_open_tool(‘program_line_view’,…,‘page’,‘breakpoints’,…)打开程序行视图对话框,并显示“断点”标签卡。

’help’ - 帮助浏览器:

GenParamNames的可能条目是’page’,‘operator’,‘manual’。

“page”:

要显示的页面。

ValuePage
‘contents’目录
‘operator’算子
‘search’搜索
‘index’Index
‘bookmarks’书签

例如:dev_open_tool(‘help’,…,‘page’,‘search’,…)打开帮助工具并选择“搜索”标签卡。

“operator”:

要显示哪个算子的html界面。

例如:dev_open_tool(‘help’,…,’[‘page’,‘operator’],[‘search’,‘read_image’] …)打开帮助工具,选择搜索标签卡并显示算子read_image的介绍。

“manual”:

手动显示哪个html界面。

’preferences’ - 首选项对话框:

“page”:

其中要显示的页面是两个值的组合。 一个组的选择和该组中的选项卡。 这两个值必须用“/”分隔。如下面的例子。

例如:dev_open_tool(‘preferences’,…,‘page’,‘user_interface / language’,…)显示来自组“user_interface”的页面“language”。

可能的组是:

ValueGroup
‘user_interface’用户接口
‘procedures’函数
‘general_options’一般属性
‘visualization_settings’可视化设置
‘runtime_settings’运行时设置

‘user_interface’:

要显示的组。

ValuePage
‘user_interface/program_listing’程序列表
‘user_interface/fonts’字体
‘user_interface/language’语言
‘user_interface/layout’布局

‘procedure’:

要显示的组

ValuePage
‘procedures/directories’目录
‘procedures/external_procedures’外部函数
‘procedures/manage_procedure_libraries’管理函数库
‘procedures/manage_passwords’管理密码
‘procedures/procedure_use’函数使用
‘procedures/unresolved_procedure_calls’未实现的函数调用

‘general_options’:

要显示的组。

PageValue
‘general_options/general_options’一般选项
‘general_options/experienced_user’高级用户

‘visualization_settings’:

要显示的组。

ValuePage
‘visualization_settings/pen’画笔
‘visualization_settings/lut’查找表
‘visualization_settings/paint’显示

‘runtime_settings’:

要显示的组。

ValuePage
‘runtime_settings/runtime_settings’运行设置
‘runtime_settings/override_operator_behavior’重载算子行为

Row和Column参数可用于设置打开工具的位置。 为了提供标准行为,即通常打开工具的最后一个位置,可以设置为“default”。

参数Width和Height用于打开设置特定的尺寸的tool。如果提供标准行为,即通常以最后打开工具的尺寸,可以通过“default”。 如果Width和Height小于tool的最小尺寸,则使用tool的最小尺寸。

通过按窗口框的关闭按钮或通过调用dev_close_tool来关闭该tool。

原文描述

dev_open_tool opens a HDevelop tool, a non-modal dialog, or assistant. The parameter ToolName contains the name of the tool which should be opened. This operator returns the ToolId of the newly created tool, which can be used by operators like dev_set_tool_geometry, dev_show_tool, dev_close_tool to address a specific tool. The opened tool automatically becomes active.

For the ToolName.‘halcon_news’ an empty ToolId is returned, because this simply should view the news page.

With GenParamName and GenParamValue it can be specified which page is displayed and more. See below. The use of GenParamName and GenParamValue is optional. If they are set to [] the tool opens with default settings.

The parameters Row and Column can be used to open the tool at a specific position. In order to apply the standard behavior, that is in general opening the tool at the last position, ‘default’ can be passed.

The parameters Width and Height can be used to open the tool with a specific size. In order to apply the standard behavior, that is in general opening the tool with the last size, ‘default’ can be passed. If Width and Height are less than the minimum size of the tool the minimum size is used.

The tool is closed by pressing the Close button of the window frame, or by calling dev_close_tool.

04. 注意

此算子不支持代码导出

05. 参数

ToolName (input_control) string → (string)
  要打开的tool的名称和tool的其他参数。

Row (input_control) rectangle.origin.y → (integer / string)
  工具左上角坐标的行索引。
  Default value: ‘default’
  Minimum increment: 1
  Recommended increment: 1

Column (input_control) rectangle.origin.x → (integer / string)
  工具左上角坐标的列索引。
  Default value: ‘default’
  Minimum increment: 1
  Recommended increment: 1

Width (input_control) rectangle.extent.x → (integer / string)
  tool的宽度。
  Default value: ‘default’
  Minimum increment: 1
  Recommended increment: 1
  Restriction: Width > 0

Height (input_control) rectangle.extent.y → (integer / string)
  tool的高度。
  Default value: ‘default’
  Minimum increment: 1
  Recommended increment: 1
  Restriction: Height > 0

GenParamNames (input_control) attribute.name(-array) → (string)
  通用参数的名称。
  Default value: []

GenParamValues (input_control) attribute.value(-array) → (string)
  通用参数的值。
  Default value: []

ToolId (output_control) dev_tool → (string)
  tool标识符(ID)。

HDevelop例程

tuple_substr.hdev Cut characters out of a string tuple
tuple_select_mask.hdev Select elements of a tuple specified by a mask
tuple_replace.hdev Replace elements of a tuple
tuple_insert.hdev Insert elements into a tuple
tuple_compare_elem.hdev Compare tuples elementwise
dev_open_tool.hdev Open and adjust tools in HDevelop

程序示例

dev_open_tool ('zoom_window',0, 0, Width, Height, [], [], ToolId)
dev_close_tool (ToolId)

06. 结果

如果指定参数的值正确,则dev_open_tool返回2(H_MSG_TRUE)。 否则会引发异常并返回错误代码。

07. 附录

7.1 机器视觉博客汇总
网址:https://dengjin.blog.csdn.net/article/details/116837497

标签:对话框,assistant,tool,dev,open,page
来源: https://blog.csdn.net/dengjin20104042056/article/details/118001813

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有