0
imageJでバッチ処理を行うのは初めてです。私は1つのディレクトリに複数の画像を処理するマクロを持っています。問題は、マクロが処理された各イメージの個別要約ウィンドウを生成し、すべての出力データを1つの.csvまたは.xlsに手動でコンパイルすることです。すべての要約データを自動的に1つのファイルにコンパイルすることをお勧めします。私はこれを行う方法を示すいくつかの情報源を見つけましたが、それは私の状況では特に役に立ちませんでした。複数の要約ファイルを保存する方法バッチ処理マクロimageJ
お手伝いできる場合は、非常に感謝しています。ここ
は、短縮コードの例である:私のテストでは
dir1 = getDirectory("Choose Source Directory ");
dir2 = getDirectory("Choose Destination directory");
list = getFileList(dir1);
setBatchMode(true);
for (i=0; i<list.length; i++){
print (list[i]);
open(dir1+list[i]);
name=File.nameWithoutExtension;
//Prepare the image by removing any scale and making 8-bit
run("Set Scale...", "distance=237.3933 known=1 pixel=1 unit=cm
global");
makeRectangle(4068, 5940, 1572, 1320);
run("Crop");
// Convert the image into RGB channels for proper thresholding
run("RGB Stack");
setSlice(3);
//Threshold
setAutoThreshold("Default");
// Analyze particles
// Provides total area of number of cotyledons in image
run("Analyze Particles...", "size=60-Infinity pixel display include
summarize");
run("Revert");
}
//Save the results
selectWindow("Summary");
saveAs("Results", dir2+"Results.xls");