概述
该插件扩展了 ImageJ 的图形用户界面。其目的是提供一个或多个易于使用的按钮栏。此类类型的栏称为“ActionBar”。将是安装常用项目(如宏、内置命令或用户插件)的好位置。
Find the latest ActionBar plus documentation here
作者
Jerome Mutterer, Johannes Schindelin, Stephan Saalfeld, Michael Schmid, Serge Mazères, Olivier Burri, Simon Roussel, Gabriel Landini.
引用
请像这样引用ActionBar:
doi:10.6084/m9.figshare.3397603
说明
该插件扩展了 ImageJ 的图形用户界面。其目的是 提供一个或多个易于使用的按钮栏。这种类型的酒吧是 称为“操作栏”。这将是经常安装使用的好地方 宏、内置命令或用户插件等项目。它可以启动一个 将一系列插件集成到美观的用户界面中(参见示例)。
Invalid img arguments: {"src"=>"actionbar.jpeg", "name"=>"ABDemo", "align"=>"center"}
每个按钮可以有一个名称、一个图标,并且可以执行三个操作之一 类型:
- 运行宏字符串
- 隐藏或显示 ImageJ 窗口
- 关闭当前栏
当然,使用宏语言,您可以运行其他宏,用户或 内置插件、javascript 等。
如何添加一行按钮
每个行按钮都应包含在行标记之间,如下所示:
<line>
// add buttons here
</line>
如何添加按钮
所有按钮都在基本配置文件中进行简单描述。您可以 使用 ImageJ 的内置文本编辑器手动编辑此文件。只需添加 新按钮每个按钮有5个按钮:
<button> |
在ActionBar中声明一个新按钮。 |
| 标签 | 按钮的名称显示在工具提示中。 |
| 图标 | 按钮的图标文件应位于“icons”文件夹中。 |
| 背景颜色 | 按钮的背景颜色1-8种默认颜色或RGB值,格式为#RRGGBB |
| 参数 | 是按钮操作的参数 |
###创建一个带标记图标的空配置文件
从插件菜单中单独选择“操作栏”,您将 受邀请创建您的第一个操作栏。之后,您可以编辑 配置文件简要介绍了实际的事情。
自定义您的 ActionBar
您可以根据需要自定义默认的ActionBarConf.txt,但是您可以
也有多个操作栏(Olivier Burri的想法)。至
要实现这一点,只需调用 Action Bar 并引用
您选择的配置文件。以下是执行此操作的两种方法:
- 来自宏:
run("Action Bar", "/plugins/Morphology/ActionBarMorphoset.txt");see also the example macro provided that starts 3 ActionBars.
- 通过安装具有不同参数的操作栏插件。
will make your custom action bar available through a standard menu
command. You can do this from Plugins/Shortcuts/Install Plugin…,
or from a macro :
run("Install Plugin...", "plugin=Action_Bar menu=Plugins command=sampleActionBar shortcut=F1 argument=/plugins/ActionBar/sampleActionBar.txt");-配置文件的路径必须相对于 ImageJ 启动 directory (see example)
- 图标应该位于plugins/ActionBar/icons/文件夹中。
如何在启动时显示一个或多个操作栏?
####推荐方式(来自ImageJ v1.49e 2014年8月2日起)
前往Edit › Options › Startup
在这里,输入启动ActionBar的命令,例如:
run("Action Bar","/plugins/ActionBar/lambda_bar.txt");
如果您的 ActionBar 文件位于下划线并且位于 在您的插件文件夹中,您还应该能够使用其启动它 自己的命令,例如:
run("lambda bar");
如果 StartupMacros 文件可用
在“StartupMacros”文件中有一个通过AutoRun的调用,
它执行位于../macros/AutoRun/中的所有宏。要使用这个
只需将宏放入设施§§1§§§结尾的文件夹中并使用
例如这一行代码用于启动您的 ActionBar。
run("Action Bar", "/plugins/ActionBar/MyNewActionBar.txt");
对于旧版本,主要已弃用
在 StartupMacros.txt 中包含 AutoRun 宏:
macro "AutoRun" {
run("Action Bar", "/plugins/Morphology/ActionBarMorphoset.txt");
}
One Action Bar can start others…
粘性操作栏
使用<sticky>属性定义你的操作栏“粘性”,将会
让您始终将您最喜欢的功能放在活动的旁边
图片窗口。下面的屏幕截图向您展示了它的样子:
遵循this link for a screencast。 即将上市。
安装
首先从ActionBar中的“下载”部分下载最新版本 插件文件夹内的文件夹。重新启动ImageJ。
ImageJ/plugins/action_bar201d.jar Action Bar plugin
ImageJ/plugins/ActionBar/ ActionBar folder for your bars
ImageJ/plugins/ActionBar/icons/ ..icons folder
...
ImageJ/plugins/test_bar.jar a standalone actionbar file
高级使用技巧
- Rainer M. Engel 写了一篇 macro that can be used to update an ActionBar in a comfortable way. Another macro makes it easy to add/remove rows/columns or for example switch button positions.
- “关闭AB”命令旨在从宏中调用,以
programmatically close an action bar. A ‘name’ should be passed as
an argument.
许可证
没有关联的许可证。引用操作栏将不胜感激。
联系方式
如果您有以下情况,请联系Jerome 发现任何错误或者您希望看到新版本中出现的某些功能 释放。
版本历史
从2017年开始,我将在figshare上上传新版本。
2014年8月
- 解决了斐济的一项更改,该更改阻止显示按钮图标。
2014年1月
- Michael Schmid 添加了代码,使 IJ 菜单在 Macintosh 上保持活动状态 the Action Bar is activated, and fixed several bugs.
- 使用新的
<hideMenus>功能来阻止IJ菜单 restored.2013年3月版本
-
感谢Gabriel Landini,ActionBars可以作为单个jar分发 files, so that they can be served through Fiji update sites.
The jar file should contain: * the action bar config file * a plugins.config file referencing the config file like this:
Plugins>Test, "Test AB with icons in jar", Action_Bar("jar:file:test_bar.jar!/test.txt")an
icons/folder with the icons. - 由Johannes Schindelin和Stephan Saalfeld建议,操作栏
can carry BeanShell code that will be executed in a single BeanShell
interpreter, so that you can share variables across buttons.
<beanshell> <line> <button> label=A arg=<bsh> i=34; </bsh> <button> label=B arg=<bsh> i=i*2; print (i); </bsh> </line>2012年5月版
- 感谢西蒙·罗塞尔,使用新工具栏新工具 positioning to the last free or last slot for IJ version >= 1.46d November 2011 version
- 图标属性现在是可选的(默认为noicon)
- 感谢Serge Mazères(IBPS,法国),添加了可选按钮
background color attribute.
→ either use one of 8 preset colors<button> label=test1 bgcolor=1 ...
→ or specify RGB color code<button> label=test2 bgcolor=#ff4480 ...2011年3月版本
- 包含Johannes Schindelin的错误修复(将所有内容备份在备份中) jar file, load example bars from jar file, include editor paster and function finder in the same class)
-
包括改进的魔术蒙太奇、代码栏和几个示例。
- 在斐济工作中:将
Fiji/plugins/ActionBar/中的自定义栏保存为 a*.ijmfile with an underscore, and refresh menus. Example: theFiji/plugins/ActionBar/1_pixel.ijmshould start like this:run("Action Bar","/plugins/ActionBar/1_pixel.ijm"); exit(); <line> <button> label=1-pixel ... - 一些新功能:
- drag and drop actions processes files dropped on the bars
... <DnDAction> file=getArgument(); open(file); run("8-bit"); </DnDAction> ...
- drag and drop actions processes files dropped on the bars
- 粘滞栏按钮可以根据下面取消
... <sticky> <line> <button> <enabled>if (bitDepth==8) return '1'; label=info icon=no arg=run("Show Info..."); </line> ...以前的版本
- 包含
<sticky>功能,以及按住Alt键单击操作栏删除。
ImageJ 卢森堡 2008 研讨会支持材料:mutterer_workshop.pdf