我正在尝试创建一个宏,它将在包含图像的文件中运行循环。为了打开我正在使用的Bio-Format importer的图像,代码工作正常,但是,它每次都会提示我选择文件中的图像。有没有办法让它在文件中自动运行?下面是我的代码。如有任何帮助,将不胜感激..
这些是我尝试过的其他一些格式,但仍然不能正常工作
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)");发布于 2019-11-21 00:51:02
这可能和在setBatchMode函数中移动所有内容一样简单
https://stackoverflow.com/questions/58648976
复制相似问题