[ImageJ-devel] default value for @parameter in Jython scripts

Curtis Rueden ctrueden at wisc.edu
Thu May 7 07:04:03 CDT 2015


Hi Brian,

> # @Integer test=10
>
> Just makes the label of the parameter "test=10", I looked at the
> Parameter notation but couldn't find a property for default value.

Very sorry for how opaque this is. I explained it in a commit message [1].

To summarize, at the moment you have to write:

# @Integer(value = 10) test

The parameter parsing will be rewritten fairly soon, at which point more
@Parameter-style features will start working as expected. For details, see
scijava/scijava-common#156 [1].

Regards,
Curtis

[1]
https://github.com/scijava/scijava-common/commit/3fdc5df4e93577be70d20d994bfc830e5dcb1676
[2] https://github.com/scijava/scijava-common/issues/156


On Thu, May 7, 2015 at 6:51 AM, Brian Northan <bnorthan at gmail.com> wrote:

> Hi
>
> I saw that Mark recently answered some questions about and updated the
> documentation for script parameters (
> http://imagej.net/Script_parameters#Parameter_properties)
>
> This is really helpful.  However I still can't figure out how to set a
> default value for a parameter in Jython
>
> # @Integer test=10
>
> Just makes the label of the parameter "test=10", I looked at the Parameter
> notation but couldn't find a property for default value.
>
> Any suggestions??  I'm probably just missing something simple.
>
> Thanks
>
> Brian
>
>
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150507/baf07fb4/attachment.html>


More information about the ImageJ-devel mailing list