我正在尝试创建一个宏,该宏将循环运行包含图像的文件。要打开图像,我正在使用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)");
答案 0 :(得分:0)
这可能就像将所有内容移动到setBatchMode函数中一样简单