Skip to content

Commit

Permalink
Replace confusing checkbox with a single-entry drop-down list
Browse files Browse the repository at this point in the history
This way we can at least show a message to the user when running in interactive
mode about closing any open images.
  • Loading branch information
ehrenfeu committed Mar 26, 2018
1 parent ce5b54f commit 6327b89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @Boolean(label="NoiSee - run SNR bead analysis",description="all open images will be closed",value="true") run_macro
// @String(label="NoiSee - Beads SNR analysis", choices={"Note: all currently open images will be closed!"}, style="listBox", description="Hit 'Cancel' otherwise!") warn_msg

This comment has been minimized.

Copy link
@imagejan

imagejan Mar 27, 2018

That's an unusual way for adding a warning message...
Wouldn't #@ String (visibility=MESSAGE, label="...") msg do? Also note that you're using the "legacy" parameter syntax with // @String msg. The now recommended syntax is #@ String msg. It is language-agnostic and will be processed anywhere in the script (not only in the header), which allows to put license headers at the top of your script.

This comment has been minimized.

Copy link
@ehrenfeu

ehrenfeu Mar 27, 2018

Author Member

Sure, this would probably do the job much better. It's just that we had been looking for something alike on https://imagej.net/Script_Parameters but to no avail.

This comment has been minimized.

Copy link
@imagejan

imagejan Mar 27, 2018

Hm, yup, documentation is sparse currently...

This comment has been minimized.

Copy link
@ehrenfeu

ehrenfeu Mar 28, 2018

Author Member

True, and scijava/scijava-common#317 is also something that bit me today...

// @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
Expand Down Expand Up @@ -26,11 +26,6 @@
// - "roi_" - index number of a ROI manager entry


if (run_macro == false)
exit("Please select the 'run analysis' option to execute the macro!");



////////////////// function definitions ///////////////////////////////

function duplicateImage(id_orig, new_name, single){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @Boolean(label="NoiSee - run Fluorescein SNR analysis",value="true") run_macro
// @String(label="NoiSee - Fluorescein SNR analysis", choices={"Note: all currently open images will be closed!"}, style="listBox", description="Hit 'Cancel' otherwise!") warn_msg
// @File(label="Dark image",description="dark field image") darkimage
// @File(label="Fluorescein image",description="fluorescein image") fluoimage
// @Boolean(label="Save results as PDF",description="generate a PDF with images and plots",value="true") save_pdf
Expand All @@ -19,11 +19,6 @@
// - "rgb_" - image IDs of 2D RGB images


if (run_macro == false)
exit("Please select the 'run analysis' option to execute the macro!");



////////////////// function definitions ///////////////////////////////

function duplicateImage(id_orig, new_name, single){
Expand Down

0 comments on commit 6327b89

Please sign in to comment.