Skip to content
Snippets Groups Projects
Commit 0aec3cb2 authored by Kai Schleicher's avatar Kai Schleicher
Browse files

feature: more robust bead segmentation

parent cb774981
No related branches found
No related tags found
No related merge requests found
......@@ -542,8 +542,8 @@ function mapTo8bitPreservingSaturation(effectiveBits) {
run("Divide...", "value=" + divisor + " stack");
setMinAndMax(0, 255);
run("8-bit");
return divisor;
return divisor;
}
function clear_workspace() {
......@@ -694,7 +694,7 @@ function process_beads() {
////////// find beads and create a mask (binary image) ////////// ////////// //////////
imgs_beadmask = duplicateImage(imgs_orig, "beadmask", false);
// run("Convert to Mask", "method=IsoData background=Dark calculate black"); // does not work anymore somehow
run("Mean...", "radius=2");
run("Auto Threshold", "method=MaxEntropy white stack use_stack_histogram");
roi_beads = binaryToSelection(imgs_beadmask, "beads", respath);
// now the background is 0 and beads are 255
......@@ -807,9 +807,9 @@ function process_beads() {
////////// measure (evaulate) using the above determined points ////////// ////////// //////////
// DISCUSS: should this be normalized (bit depth) to allow comparing different sensors?
measureSelection(img_std, "StdDev", respath, false, save_measurements);
getStatistics(_, mean_std, _, _, std_std); // mean and std from the Noise
print("StdDev stats: mean=" + mean_std + " std=" + std_std);
getStatistics(_, mean_std, _, _, std_std); // mean and std from the Noise
print("StdDev stats: mean=" + mean_std + " std=" + std_std);
measureSelection(img_snr, "SNR", respath, false, save_measurements);
getStatistics(_, mean_snr, _, _, std_snr); // mean and std from the SNR
print("SNR stats: mean=" + mean_snr + " std=" + std_snr);
......@@ -944,8 +944,8 @@ function process_beads() {
pairs = Array.concat(pairs, "", "");
pairs = Array.concat(pairs, "-- Input --", "");
pairs = Array.concat(pairs, "Filename", fname);
pairs = Array.concat(pairs, "Rescaling divisor used", divisor);
pairs = Array.concat(pairs, "Rescaling divisor used", divisor);
createTable(title, pairs, respath + "/" + "NoiSee-summary.txt");
img_summary = createTableImage(title, pairs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment