1
我有下面的代碼,當我嘗試關閉ROI管理和蒙太奇在其結束工作只是罰款我得到的錯誤:ImageJ的「有沒有圖像打開」
There are no images open
我開始不指定窗口,然後嘗試指定窗口,嘗試run("Close");
,只是close();
。 ROI管理器和蒙太奇都會用當前的宏關閉,但會彈出消息。我在這裏做錯了什麼?
macro "draw rois [v]"{
var list="/Volumes/bkonk7/old_OCT/ROI_list.txt";
pathroot="/Volumes/bkonk7/old_OCT/";
var pathlist=File.openAsString(list);
var pathsplit=split(pathlist, "\n");
for(i=0;i<pathsplit.length;i++){
var roilist=split(pathsplit[i], ".");
run("Image Sequence...", "open="+pathroot+roilist[i]+" sort");
run("Rotate 90 Degrees Right");
run("RGB Color");
roiManager("Open", pathroot+pathsplit[i]);
roicount=roiManager("count");
for(j=0;j<roicount;j++){
roiManager("Select", j);
run("Draw", "slice");
}
saveAs("Tiff", pathroot+roilist[i]+"_edit.tif");
run("Image Sequence...", "open="+pathroot+roilist[i]+" sort");
run("Rotate 90 Degrees Right");
run("RGB Color");
splitname=split(roilist[i],"/");
run("Combine...", "stack1="+splitname[2]+"_edit.tif stack2="+splitname[2]);
saveAs("Tiff", pathroot+roilist[i]+"_edit.tif");
selectWindow("ROI Manager");
run("Close");
selectWindow(splitname[2]+"_edit.tif");
close();
}
}