【发布时间】:2022-08-09 01:05:52
【问题描述】:
我目前正在尝试使用 ImageJ/Fiji 一次批量处理大量实验室图像,但我很难让它处理图像。每当拉起文件时,就会有三个图像被分成通道并在单独的窗口中打开。在处理过程中,每个窗口都被选中,需要进行不同的处理。我目前正在尝试弄清楚如何使程序根据特定参数而不是窗口的确切名称来选择每个不同的窗口。每个窗口都将以 \"C=0\"、\"C=1\" 或 \"C=2\" 结尾。我希望代码选择其中包含字符串 \"C=0\"、\"C=1\" 或 \"C=2\" 的窗口,但我似乎无法让它工作.到目前为止,它只运行第一个文件,而不运行其余文件。我正在运行的当前代码如下所示。
open(\"/Users/name/Desktop/name of file\");
selectWindow(\"name of window - C=1\");
setOption(\"ScaleConversions\", true);
run(\"8-bit\");
setAutoThreshold(\"Default\");
//run(\"Threshold...\");
//setThreshold(0, 10);
setOption(\"BlackBackground\", true);
run(\"Convert to Mask\");
run(\"Convert to Mask\");
run(\"Analyze Particles...\");
close();
run(\"Close\");
selectWindow(\"name of window - C=0\");
setOption(\"ScaleConversions\", true);
run(\"8-bit\");
setAutoThreshold(\"Default\");
//run(\"Threshold...\");
//setThreshold(0, 20);
run(\"Convert to Mask\");
run(\"Convert to Mask\");
run(\"Analyze Particles...\", \"size=20-700 show=Overlay display summarize add composite\");
run(\"Analyze Particles...\");
roiManager(\"Show None\");
roiManager(\"Show All\");
run(\"Close\");
close();
run(\"Close\");
selectWindow(\"name of window - C=2\");
setOption(\"ScaleConversions\", true);
run(\"8-bit\");
setAutoThreshold(\"Default\");
//run(\"Threshold...\");
//setThreshold(0, 4);
run(\"Convert to Mask\");
run(\"Convert to Mask\");
run(\"Analyze Particles...\");
saveAs(\"Results\", \"/Users/name/Desktop/results/Summary.csv\");
任何和所有的帮助都将非常感激。谢谢你。
-
我不完全了解您需要什么帮助。所以代码工作正常你只想在多个文件上运行它?
标签: imagej fiji imagej-macro