plugins - FIJI / ImageJ:如何在另一个插件中使用一个插件的类?
问题描述
我想使用这个类——它在ImageJAuto_Threshold
中实现了“Auto Threshold”插件。根据http://imagej.net/Writing_plugins#The_Context,我可以访问其他插件功能,例如使用LogService
@Parameter
private LogService logService;
然而,这并不适用于所有事情。我试过了
@Parameter
private Auto_Threshold AutoThreshold
但这不起作用。我从https://github.com/fiji/Auto_Threshold/blob/Auto_Threshold-1.16.5/src/main/java/fiji/threshold/Auto_Threshold.java的源代码中看到该类存在于fiji.threshold
包中。当然,我可以将该代码复制到我的源目录并使用该包。这是最好的做法,还是有更正式的方式来依赖另一个插件?
谢谢,罗里
解决方案
您可以使用 CommandService 可能:
@Parameter
private CommandService cs;
然后每当你想做某事时:
cs.run(OtherPlugin.class, true, ...)
推荐阅读
- spring - 如何从我创建的表单中将数据插入到产品表中?
- python - 有人可以解释为什么我在 Python 中得到这个输出吗?
- python - 除以 2 个整数(leetcode 29) - 递归问题
- html - 单击按钮时文本未重新显示
- algorithm - 对于水准点系统,这看起来像什么代数公式?
- ios - 自 pod 更新以来,iOS 地图左上角的 GoogleMaps 相机目标
- vb.net - TmdbLib 帮助发现两个不同日期之间的电影
- python - 为什么 df.apply(pd.value_counts) “双重计数”布尔值既是整数 1(或 0)又是 True(或 False),但取决于 df 中的其他整数?
- android - 表单式屏幕的最佳布局
- node.js - 引用架构