【发布时间】:2014-12-18 12:21:13
【问题描述】:
我对 python/脚本非常陌生,但遇到了问题。我正在斐济写以下内容(脚本的缩写版本如下...)
from ij import IJ, ImagePlus
from java.lang import Runtime, Runnable
import os
filepaths = []
for folder, subs, files in os.walk('location/of/files/'):
for filename in files:
#the next part stops it appending DS files
if not filename.startswith('.'):
filepaths.append(os.path.abspath(os.path.join(folder, filename,)))
for i in filepaths:
IJ.open(i);
IJ.close();
基本上我想打开一个图像,做一些事情,然后使用IJ.close()关闭处理后的图像。但是它给出了以下错误:
AttributeError: type object 'ij.IJ' has no attribute 'close'
知道如何解决这个问题吗?
谢谢!
【问题讨论】: