diff --git a/05_example_code_and_data/analyse_rounding_assay.ijm b/05_example_code_and_data/analyse_rounding_assay.ijm new file mode 100644 index 0000000000000000000000000000000000000000..3d5267ba0c6a1fa40c0ac33bd9f11989676f95a6 --- /dev/null +++ b/05_example_code_and_data/analyse_rounding_assay.ijm @@ -0,0 +1,26 @@ + +// 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); diff --git a/05_example_code_and_data/analyse_rounding_assay_folder.ijm b/05_example_code_and_data/analyse_rounding_assay_folder.ijm new file mode 100644 index 0000000000000000000000000000000000000000..fd4c94194e4a663a90845975392bced249fb695c --- /dev/null +++ b/05_example_code_and_data/analyse_rounding_assay_folder.ijm @@ -0,0 +1,34 @@ + +// 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);