- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试更改现有插件 OpenComet对于 ImageJ。我不喜欢 Java,所以也许这是一个简单的任务。
我正在尝试实现以下内容
run("Bio-Formats Windowless Importer", "open=path autoscale color_mode=Default view=Hyperstack stack_order=XYCZT");
在 Bioformat Importer 插件的帮助下打开我的文件
run("水平翻转");
这应该放入以下代码中:
// Iterate over each input file
for(int i=0;i<inFiles.length;i++){
// Try to open file as image
//NUMBER 1 BIOFORMAT IMPORT AT THIS POINT
ImagePlus imp = IJ.openImage(inFiles[i].getPath());
// If image could be opened, run comet analysis
if(imp!=null){
//NUMBER 2 FLIPPING AT THIS POINT
String imageKey = inFiles[i].getName();
此外,我需要导入 BioFormat Importer 的类或类似的东西。我不会吗?
提前非常感谢。
最佳答案
run("Bio-Formats Windowless Importer", "open=path autoscale
color_mode=Default view=Hyperstack stack_order=XYCZT");opening my files with the help of the Bioformat Importer plugin
您可以使用生物格式的 BF
辅助类来实现此目的(请参阅其 API documentation )。对于 javascript 示例,请查看 here 。在 Java 中,这可能如下所示:
import loci.plugins.BF;
[...]
ImagePlus[] imps = BF.openImagePlus(inFiles[i].getPath());
ImagePlus imp = imps[0];
run("Flip Horizontally");
使用recorder (插件 > 宏 > 记录...)在 Java 模式下获取所需的命令:
import ij.IJ;
[...]
IJ.run(imp, "Flip Horizontally", "");
如果你想了解较低级别的Java命令,请使用Command Finder (按 [L] 或插件 > 实用程序 > 查找命令...)并输入“flip”,您将找到实现该命令的类:
ij.plugin.filter.Transformer("fliph")
希望有帮助。
关于java - 将 ImageJ 宏命令实现到现有插件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30015440/
我正在使用 Netbeans 6.8 并尝试使用/* */样式创建自定义 PHP 注释代码块宏,而不是通常的双斜杠。 到目前为止,通过谷歌搜索和 PHPUGPH 查询,我得到了这个宏代码(工具->选项
我是一名优秀的程序员,十分优秀!