Commit 470f881c authored by rhaase's avatar rhaase

added solution for exercise 05

parent a517ae2a
// configuration
folder = "C:/structure/teaching/lecture_applied_bioimage_analysis/05_example_data/rounding_assay/";
image_file = "rounding_assay0035.tif";
result_csv_file = "summary.csv";
// configure measurement
run("Set Measurements...", "fit shape redirect=None decimal=3");
// process imagge
open(folder + image_file);
setAutoThreshold("MaxEntropy dark");
setOption("BlackBackground", true);
run("Convert to Mask");
// get rid of single pixels
run("Erode");
run("Dilate");
// measure properties
run("Analyze Particles...", "summarize");
// save the result table
IJ.renameResults("Summary", "Results");
saveAs("Results", folder + result_csv_file);
// configuration
folder = "C:/structure/teaching/lecture_applied_bioimage_analysis/05_example_data/rounding_assay/";
result_csv_file = "summary.csv";
// configure measurement
run("Set Measurements...", "fit shape redirect=None decimal=3");
// retrieve all files in the folder in an array
filelist = getFileList(folder);
for (i = 0; i < lengthOf(filelist); i++) {
image_file = filelist[i];
if ( endsWith(image_file, ".tif")) {
// process imagge
open(folder + image_file);
setAutoThreshold("MaxEntropy dark");
setOption("BlackBackground", true);
run("Convert to Mask");
// get rid of single pixels
run("Erode");
run("Dilate");
// measure properties
run("Analyze Particles...", "summarize");
close();
}
}
// save the result table
IJ.renameResults("Summary", "Results");
saveAs("Results", folder + result_csv_file);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment