ImageJ的jar文件的插件快捷方式创建 [英] ImageJ jar file plugin shortcut creation

查看:2610
本文介绍了ImageJ的jar文件的插件快捷方式创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在发育生物学标记的项目用DAPI染色,以确定标志物前pression的比例沿着各种核标记。我发现,ImageJ的插件ITCN( http://rsbweb.nih.gov/ij/插件/ itcn.html )时也使用程序CLAHE每个标记的伟大工程。我的问题是,我有6000左右的图像来分析,我很想能够实现流程的自动化。我已经录制宏如以下(其本身可循环到单独的图像文件):

I have been working on a developmental biology project marking various nuclear markers along with a DAPI stain to determine percentage of marker expression. I have found that the ImageJ plugin ITCN (http://rsbweb.nih.gov/ij/plugins/itcn.html) works great for each marker when also using the CLAHE program. My problem is that I have around 6000 images to analyze and I would love to be able to automate the process. I have recorded a macro such as the following (which can itself be looped to individual image files) :

open("image");
run("8-bit");
run("CLAHE");
run("ITCN ");
close();

但ITCN图标无法启动自动分析,也没有一个很容易编程的捷径来完成这项工作。我完全不知道任何Java编程,我很想知道是否有无论如何要解决这个可能很容易的问题。

but the ITCN icon wont start analyzing automatically, nor is there an easily programmed short cut to do the job. I am completely ignorant to any Java programming and I would love to know if there is anyway to get around this likely easy problem.

在此先感谢
迈克尔

Thanks in advance Michael

推荐答案

ITCN 插件实现为 PlugInFrame 和它的设置不是记录的,因为你已经发现。然而,查看源,似乎插件仅仅使用一个名为另一类 ITCN_Runner 一旦收集的选项,你应该能够以编程方式调用。

The ITCN plugin is implemented as a PlugInFrame and its settings are not recordable, as you have discovered. However, looking at the source, it seems that the plugin just uses another class called ITCN_Runner once it has gathered the options, which you should be able to call programmatically.

但是,你不能从宏语言做到这一点。也许最简单的选择是使用ImageJ的内置的JavaScript脚本。例如,启动宏录制像往常一样,但在左上方选择的JavaScript。然后第一对夫妇的命令似乎对我来说(有一些格式化为清楚起见)为:

However, you can't do this from the macro language. Probably the easiest alternative is to use ImageJ's built-in Javascript scripting. For example, start up the Macro Recorder as usual, but select "JavaScript" in the top left. Then the first couple of commands appear for me (with some reformatting for clarity) as:

imp = IJ.openImage("/home/mark/test.tif");
IJ.run(imp, "8-bit", "");
IJ.run(imp,
       "Enhance Local Contrast (CLAHE)",
       "blocksize=127 histogram=256 maximum=3 mask=*None* fast_(less_accurate)");

然后,如果你看一下ITCN插件的源$ C ​​$ C,你可以看到如何创建 ITCN_Runner 类并运行它 - 例如:

Then if you look at the source code of the ITCN plugin you can see how to create the ITCN_Runner class and run it - for example:

runner = new ITCN_Runner( imp,
                          1, /* width*/
                          5.0, /* minimum distance */
                          0, /* threshold */
                          false, /* detect dark peaks */
                          null /* mask ImagePlus */ )
runner.run()

这是产生在另一个窗口输出,具有相同的名称但结果 prefixed。

That produces output in another window, which has the same name but with "Results " prefixed.

这篇关于ImageJ的jar文件的插件快捷方式创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆