From 53a028c38d9a1a8a9865d8057c760bab587f9b11 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Wed, 5 Sep 2018 16:04:45 +0200
Subject: [PATCH] Add log message when mapping to 8 bit

---
 .../scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm b/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm
index e0f41c8..dbab47f 100644
--- a/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm
+++ b/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm
@@ -526,14 +526,18 @@ function mapTo8bitPreservingSaturation(effectiveBits) {
     // range was adjusted to the min/max values of the image (resulting in
     // over-saturation of wrongly mapped pixels)
     if (effectiveBits == 16) {
-        run("Divide...", "value=257.50 stack");
+        divisor = 257.50;
     } else if (effectiveBits == 12) {
-        run("Divide...", "value=16.09 stack");
+        divisor = 16.09;
     } else {
         print("Unsupported VALUE range detected: " + effectiveBits + " bits");
         print("Input image needs to have a value range of 8, 12 or 16 bits!");
         exit_show();
     }
+    msg = "mapping " + effectiveBits + " bit value range to 8 bit";
+    msg = msg + " (dividing pixel values by " + divisor + ")";
+    logd(msg);
+    run("Divide...", "value=" + divisor + " stack");
     run("8-bit");
 }
 
-- 
GitLab