【发布时间】:2016-10-26 00:03:54
【问题描述】:
我是 ImageJ 的新手,正在尝试使用 Python(在 ImageJ 宏编辑器中)重新创建以下宏。
s = selectionType();
if( s == -1 ) {
exit("There was no selection.");
} else if( s != 10 ) {
exit("The selection wasn't a point selection.");
} else {
getSelectionCoordinates(xPoints,yPoints);
x = xPoints[0];
y = yPoints[0];
showMessage("Got coordinates ("+x+","+y+")");
}
问题是,我不知道如何导入 selectionType() 和 getSelectionCoordinates() 内置函数。当我尝试在 Python 代码中使用它们时,我得到了 NameError。
有什么想法吗?
谢谢, 亚历克斯
【问题讨论】:
标签: python jython imagej imagej-macro