简体   繁体   English

如何从Python 3.4.2控制ImageJ

[英]how to control ImageJ from Python 3.4.2

I am trying to use Python 3.4.2 to control ImageJ 我正在尝试使用Python 3.4.2来控制ImageJ

what I want to do is from python code , I want to sent orders to imageJ to analayse some images, detecting edges, contrast, noise etc there is a similar question here How to connect ImageJ to python? 我想做的是从python代码开始我想向imageJ发送命令以分析一些图像,检测边缘,对比度,噪点等,这里有一个类似的问题如何将ImageJ连接到python? but there is no answer, like "install this, and control the Find Edges button with this command" 但没有答案,例如“安装此程序,并使用此命令控制“查找边缘”按钮”

I wonder how can I do that, can somebody help me 我不知道该怎么办,有人可以帮我吗

I have found this link , and this link , and they say that it is possible by using "import ij" but there is no ij library that I can use or install. 我找到了这个链接和这个链接 ,他们说可以通过使用“ import ij”来实现,但是没有我可以使用或安装的ij库。

also ImageJ website states in "How can I call ImageJ from my software?" ImageJ 网站也指出“如何从软件中调用ImageJ?” that "If your software is written in another language such as C or Python, there are many ways to integrate Java functionality. You must choose which one is best for your particular requirements." “如果您的软件是用另一种语言(如C或Python)编写的,则有很多方法可以集成Java功能。您必须选择最适合您的特定要求的Java。” but there are no specifics 但没有细节

this Google webpage says that with "py4ij" I can control imagej with python "Py4IJ - Python for ImageJ - plugin and IDE that allows Python and Jython access to the ImageJ" 这个Google网页说,通过“ py4ij”,我可以使用python“ Py4IJ-用于ImageJ的Python-插件和IDE允许Python和Jython访问ImageJ”来控制imagej。

but I am not sure how to run it, Help 但我不确定如何运行,帮助

as an alternative to Imagej is Fiji but I am not sure if python can control it or I have to use Fiji , and Fiji tutorial 作为Imagej的替代品,是斐济,但我不确定python是否可以控制它,还是我必须使用Fiji斐济教程

my last alternative is Using OpenCV for image processing but I actually need to use ImageJ or Fiji, so OpenCV is not a valid answer 我的最后一个选择是使用OpenCV进行图像处理,但实际上我需要使用ImageJ或Fiji,因此OpenCV不是有效的答案

thanks 谢谢

EDIT 编辑

according to the first answer, it suggest to write a CellProfiler's RunImageJ module, but my question is should I have to install CellProfiler? 根据第一个答案,它建议编写一个CellProfiler的RunImageJ模块,但是我的问题是我是否必须安装CellProfiler? from here , following the examples here and here and running the module 这里开始 ,遵循此处此处的示例并运行模块

or should I follow the native Python idea from this link 或者我应该遵循此链接中的原生Python想法

in any case the first answer link talks about Jython, but I can not use Jython, the latest version of it is based on python2.7 and I am using 3.4, and there is no development for jython 3.x 无论如何,第一个答案链接谈论的是Jython,但我不能使用Jython,它的最新版本基于python2.7,而我使用的是3.4,并且jython 3.x尚无开发

help 救命

Integration of Python with ImageJ was recently discussed on the new ImageJ forum; 最近在新的ImageJ论坛上讨论了Python与ImageJ的集成。 see the Python scripting thread. 请参阅Python脚本编制线程。

While it focuses on calling native-code-wrapped Python modules such as NumPy from ImageJ, the reverse direction (calling ImageJ from Python) is also addressed by some of the solutions, particularly CellProfiler's RunImageJ module. 虽然它专注于调用本机代码包装的Python模块,例如从ImageJ调用NumPy,但某些解决方案也解决了反向问题(从Python调用ImageJ),尤其是CellProfiler的RunImageJ模块。 As discussed there, a dedicated programmer could start there and champion a more general solution for the benefit of the community. 如此处所讨论的,一个专门的程序员可以从那里开始,并为社区的利益拥护一个更通用的解决方案。

In general, this issue is discussed on the ImageJ wiki on the Python page, particularly the section on limitations . 通常,此问题在Python页面的ImageJ Wiki上进行了讨论,尤其是关于局限性部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM