简体   繁体   English

在Java中将斐济图像处理用作库

[英]Using Fiji image processing as a library in Java

Fiji ( http://fiji.sc ) is an app that, as far as I can tell, is written in Java and does image processing. 据我所知,斐济( http://fiji.sc )是一个应用程序,它是用Java编写并进行图像处理的。 Is there any way to remove the 'app' part and just use it as a normal library and import it in a normal Java project? 有什么方法可以删除“ app”部分并将其用作普通库并将其导入普通Java项目中吗?

Right now the only two options available are 'scripts' and 'plugins'. 现在,仅有的两个选项是“脚本”和“插件”。 Neither of which I want as they both live within this Fiji editor app. 我都不想要它们,因为它们都生活在此斐济编辑器应用程序中。 Is there a place just to download the image processing libraries and not the whole app? 是否有只下载图像处理库而不是整个应用程序的地方?

Fiji itself is a package distribution of the ImageJ library, which may suit what you are trying to accomplish. 斐济本身是ImageJ库的软件包分发版,它可能适合您要完成的工作。

If you are using Maven, declare the dependencies in your pom.xml : 如果您使用的是Maven,请在pom.xml声明依赖项:

<parent>
  <groupId>net.imagej</groupId>
  <artifactId>pom-imagej</artifactId>
  <version>2.35</version>
</parent>
...
<dependency>
  <groupId>net.imagej</groupId>
  <artifactId>imagej</artifactId>
</dependency> 

If not, you can grab the .jar off the repository manager on their website and include it as an external dependency. 如果没有,您可以从其网站上的存储库管理器中获取.jar并将其作为外部依赖项包含在内。 You can then start messing around with the library in your project: 然后,您可以开始弄乱项目中的库:

public void loadAndDisplay(File file) {
    ImageJ ij = new ImageJ();
    Object data = ij.io().open(file);
    ij.ui().show(data);
} 

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

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