我正在尝试创建一个宏,它将通过包含图像的文件运行循环。要打开图像,我正在使用 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)");