我正在尝试创建一个宏,该宏将在包含图像的文件中运行循环。要打开图像,我正在使用Bio-Format导入程序,并且代码正在工作,但每次都会提示我选择文件中的图像。有没有办法让它自动在文件中运行?这是我下面的代码。。。任何帮助都将不胜感激。。
这些是我尝试过的一些其他格式,但仍然无法使其工作
run("Bio-Formats Importer", "open= + inputDirectory + fileList[i] color_mode=Default view=Hyperstack stack_order=XYCZT");
run("Bio-Formats Importer", "open(fileList) color_mode=Default rois_import=[ROI manager] split_channels view=Hyperstack stack_order=XYCZT");
run("Bio-Formats Importer", "open= + inputDirectory + fileList[i] color_mode=Default rois_import=[ROI manager] split_channels view=Hyperstack stack_order=XYCZT")
run("Bio-Formats", "open=" + fileList[i] " color_mode=Default open_all_series rois_import=[ROI manager] split_channels view=Hyperstack stack_order=XYCZT");
run("Bio-Formats Importer", "open=["+fileList[i]+"] color_mode=Default view=Hyperstack stack_order=XYCZT series_"+d2s(j,0));
setBatchMode(true);
inputDirectory = getDirectory("Choose a Directory of Image")
fileList = getFileList(inputDirectory);
for (i = 0; i < fileList.length; i++)
{
processImage(fileList[i]);
outputDirectory = "S:/Research/MLW/OUTPUT/";
outputFile = outputDirectory+fileList[i]+".csv";
saveAs("results",outputFile);
}
setBatchMode(false);
function processImage(imageFile)
{
prevNumResults = nResults;
run("Bio-Formats Macro Extensions");
run("Bio-Formats Importer", "open= + inputDirectory + fileList[i] color_mode=Default rois_import=[ROI manager] split_channels view=Hyperstack stack_order=XYCZT");
filename = getTitle();
run("Auto Threshold", "method=Yen white");
run("Skeletonize (2D/3D)");
这可能很简单,只需移动setBatchMode函数中的所有内容