Script Parameter Defaults are not displayed correctly

Hi guys,

I created a python script that used the wonderful script parameters. It looks like this:

# @File(label = "Image File") FILENAME
# @Integer(label = "Binning Factor", value=4) BINFACTOR
# @float(label = "Median Filter - Radius of Disk Element", value=3.0) RADIUS
# @Integer(label = "PA - Min.Size", value=100000) MINSIZE
# @float(label = "PA - Min. Circularity", value=0.01) MINCIRC
# @float(label = "PA - Max. Circularity", value=0.99) MAXCIRC
# @OUTPUT String FILENAME
# @OUTPUT Integer BINFACTOR
# @OUTPUT float RADIUS
# @OUTPUT Integer MINSIZE
# @OUTPUT float MINCIRC
# @OUTPUT float MAXCIRC

But the output looks always different from what I expect, when it come to the default values:

Any idea, why that is?

Sebi

By default, script parameters are persist = true, i.e. previous values you entered are remembered across subsequent runs of the same script (and currently even across scripts, which is a bug).

Persisted values override the default values defined by value = xxx.

If you always want to see the default values, you should use:

#@Integer(label = "PA - Min.Size", value=100000, persist=false)
...

NB: I realize this is poorly documented on the wiki. Maybe you have time to add a paragraph here:

The javadoc for the Parameter class has it:

1 Like

To circumvent rounding of those and have them displayed as floating point numbers use #@Float (mind the capital F).