From b2e5984c43f9c8793e44599b1e5b57d76e72af88 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Wed, 28 Mar 2018 15:14:13 +0200
Subject: [PATCH] Use modern style for script parameters, remove logging
 options

The logging related options are useful for development, but not relevant
for the end user. Hence they are now hard-coded in the macro instead of
presented in the dialog.

If required, anyone can open the macro code from the package by hitting the
"Source" button in the search results and adjust the corresponding lines.
---
 .../Plugins/NoiSee/NoiSee_Bead_Analysis.ijm   | 32 +++++++++++--------
 .../NoiSee/NoiSee_Fluorescein_Analysis.ijm    | 24 ++++++++------
 2 files changed, 34 insertions(+), 22 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 797a6ec..3596021 100644
--- a/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm
+++ b/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Bead_Analysis.ijm
@@ -1,16 +1,3 @@
-// #@ String (visibility=MESSAGE, label="NoiSee  -", value="Beads SNR analysis", persist=false) msg_title
-// @File(label="Beads time-series image",description="2D time-lapse acquisition of fluorescent beads") beadsimage
-// @Integer(label="Beads diameter (in pixels)",description="approximate bead diameter (in pixels)",value=15) beads_diameter
-// @Integer(label="Find Maxima noise tolerance",description="typical values: [PMT=50] [HyD (photon counting)=10] [Camera=500]",value=50) beads_noisetolerance
-// @Boolean(label="Create Kymographs",description="visual indicator for drift and bleaching",value="true") make_kymographs
-// @Boolean(label="Save additional measurements",description="store 'StdDev', 'SNR', 'Mean' and 'bleaching' measurements",value="false") save_measurements
-// @Boolean(label="Save results as PDF",description="generate a PDF with images and plots",value="true") save_pdf
-// @Boolean(label="Keep ROI images open",description="if disabled ROI visualizations will only be added to PDF",value="false") keep_roiimages
-// @Integer(label="Log level",description="higher number means more messages",min=0,max=2,style="scroll bar") LOGLEVEL
-// @Boolean(label="Save log messages",description="save contents of the 'Log' window in a text file",value="false") save_log
-// #@ String (visibility=MESSAGE, label="Note:", value="all currently open images will be closed", persist=false) msg_note_close
-
-
 //////////// NoiSee Beads Analysis ///////////////////////////////////////////////////////
 // SNR evaluation macro, written by Kai Schleicher, Niko Ehrenfeuchter, IMCF Basel
 // licence: GPLv3
@@ -27,6 +14,25 @@
 //  - "roi_"  - index number of a ROI manager entry
 
 
+//////// Script Parameters, see https://imagej.net/Script_Parameters for details
+#@ String (visibility=MESSAGE, label="NoiSee  -", value="Beads SNR analysis", persist=false) msg_title
+#@ File(label="Beads time-series image",description="2D time-lapse acquisition of fluorescent beads") beadsimage
+#@ Integer(label="Beads diameter (in pixels)",description="approximate bead diameter (in pixels)",value=15) beads_diameter
+#@ Integer(label="Find Maxima noise tolerance",description="typical values: [PMT=50] [HyD (photon counting)=10] [Camera=500]",value=50) beads_noisetolerance
+#@ Boolean(label="Create Kymographs",description="visual indicator for drift and bleaching",value="true") make_kymographs
+#@ Boolean(label="Save additional measurements",description="store 'StdDev', 'SNR', 'Mean' and 'bleaching' measurements",value="false") save_measurements
+#@ Boolean(label="Save results as PDF",description="generate a PDF with images and plots",value="true") save_pdf
+#@ Boolean(label="Keep ROI images open",description="if disabled ROI visualizations will only be added to PDF",value="false") keep_roiimages
+#@ String (visibility=MESSAGE, label="Note:", value="all currently open images will be closed", persist=false) msg_note_close
+
+
+// valid log levels: 0 (quiet), 1 (info messages), 2 (debug messages)
+LOGLEVEL=0;
+
+// save contents of the 'Log' window in a text file:
+save_log=false;
+
+
 ////////////////// function definitions ///////////////////////////////
 
 function duplicateImage(id_orig, new_name, single){
diff --git a/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Fluorescein_Analysis.ijm b/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Fluorescein_Analysis.ijm
index 79bff0e..df3054d 100644
--- a/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Fluorescein_Analysis.ijm
+++ b/src/main/resources/scripts/Plugins/NoiSee/NoiSee_Fluorescein_Analysis.ijm
@@ -1,12 +1,3 @@
-// #@ String (visibility=MESSAGE, label="NoiSee  -", value="Fluorescein SNR analysis", persist=false) msg_title
-// @File(label="Dark image",description="dark field image (i.e. 'laser off')") darkimage
-// @File(label="Fluorescein image",description="image of a homogeneous fluorescent solution") fluoimage
-// @Boolean(label="Save results as PDF",description="generate a PDF with images and results",value="true") save_pdf
-// @Integer(label="Log level",description="higher number means more messages",min=0,max=2,style="scroll bar") LOGLEVEL
-// @Boolean(label="Save log messages",description="save contents of the 'Log' window in a text file",value="false") save_log
-// #@ String (visibility=MESSAGE, label="Note:", value="all currently open images will be closed", persist=false) msg_note_close
-
-
 //////////// NoiSee Fluorescein Analysis ///////////////////////////////////////////////////////
 // SNR evaluation macro, written by Kai Schleicher, Niko Ehrenfeuchter, IMCF Basel
 // licence: GPLv3
@@ -19,6 +10,21 @@
 //  - "rgb_"  - image IDs of 2D RGB images
 
 
+//////// Script Parameters, see https://imagej.net/Script_Parameters for details
+#@ String (visibility=MESSAGE, label="NoiSee  -", value="Fluorescein SNR analysis", persist=false) msg_title
+#@ File(label="Dark image",description="dark field image (i.e. 'laser off')") darkimage
+#@ File(label="Fluorescein image",description="image of a homogeneous fluorescent solution") fluoimage
+#@ Boolean(label="Save results as PDF",description="generate a PDF with images and results",value="true") save_pdf
+#@ String (visibility=MESSAGE, label="Note:", value="all currently open images will be closed", persist=false) msg_note_close
+
+
+// valid log levels: 0 (quiet), 1 (info messages), 2 (debug messages)
+LOGLEVEL=0;
+
+// save contents of the 'Log' window in a text file:
+save_log=false;
+
+
 ////////////////// function definitions ///////////////////////////////
 
 function duplicateImage(id_orig, new_name, single){
-- 
GitLab