Halcon算子翻译——dev_open_tool

名称

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

用法

dev_open_tool( : : ToolName, Row, Column, Width, Height, GenParamNames, GenParamValues : ToolId)

描述

  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是可选的。 如果它们设置为[],则工具将以默认设置打开。

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

ToolName

Main Windows

'graphics_window' 图形窗口
'operator_window' 算子窗口
'program_listing' 程序列表
'variable_view' 变量窗口
ToolName

Assistants

'calibration_assistant' 相机标定助手
'image_acquisition_assistant' 图像采集助手
'matching_assistant' 匹配助手
'measure1d_assistant' 一维测量助手
'ocr_assistant' OCR助手
ToolName

Tools

'call_stack' 调用堆栈
'feature_histogram' 特征直方图
'feature_inspection' 特征检测
'gray_histogram' 灰度直方图
'line_profile' 轮廓线
'zoom_window' 缩放窗口
'ocr_training_file_browser' OCR训练文件浏览器
ToolName

Dialogs

'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':

    要显示的页面。

Value Page
'setup' 安装
'calibration' 标定
'results' 结果
'code_generation' 代码生成

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

'image_acquisition_assistant' - 图像采集助手:  

    'page':

      要显示的页面。

Value Page
'source' 资源
'connection' 连接
'parameters' 参数
'code_generation' 代码生成

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

  'matching_assistant' - 匹配助手:   

    'page':

      要显示的页面。

Value Page
'model_creation' 创建
'model_parameter' 参数
'model_use' 应用
'inspect' 检测
'code_generation' 代码生成

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

  'measure1d_assistant' - 测量助手:

  'page':

    要显示的页面。

Value Page
'input' 输入
'edges' 边缘
'fuzzy' 模糊
'results' 结果
'code_generation' 代码生成

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

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

    "page":

      要显示的页面。

Value

Page

'invalid_lines' 无效行
'find_all' 查找所有
'breakpoints' 断点
'bookmarks' 书签

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

  'help' - 帮助浏览器:

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

    "page":

      要显示的页面。

Value Page
'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”。

      可能的组是:

Value Group
'user_interface' 用户接口
'procedures' 函数
'general_options' 一般属性
'visualization_settings' 可视化设置
'runtime_settings' 运行时设置

      'user_interface':

        要显示的组。

Value Page
'user_interface/program_listing' 程序列表
'user_interface/fonts' 字体
'user_interface/language' 语言
'user_interface/layout' 布局

      'procedure':

        要显示的组

Value

Page

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

    

      'general_options':

        要显示的组。

Page

Value

'general_options/general_options' 一般选项
'general_options/experienced_user' 高级用户

      'visualization_settings':

        要显示的组。

Value Page
'visualization_settings/pen' 画笔
'visualization_settings/lut' 查找表
'visualization_settings/paint' 显示

      'runtime_settings':

        要显示的组。

Value Page
'runtime_settings/runtime_settings' 运行设置
'runtime_settings/override_operator_behavior' 重载算子行为

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

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

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

注意

此算子不支持导出

参数

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)

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

结果

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

Possible Successors

dev_set_tool_geometry, dev_show_tool, dev_close_tool

模块

Foundation

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

原文地址:https://www.cnblogs.com/xhiong/p/7840054.html