There is a universal <code>@parameter</code> notation available across all scripts for declaring inputs and outputs. This approach is preferred to using ImageJ 1.x <code>GenericDialog</code> because it is totally agnostic to the user interface, allowing such scripts to run in a variety of contexts.
The rules for <code>@parameter</code> use
is as follows:
For example, if we look at the Greeting.py template supplied with Fiji:
When the script is completed, we expect to have a <code>String</code> variable named <code>greeting</code> which will be displayed as appropriate, based on the variable type.
Note that if we added an extra comment to the top of our script as
We would actually break the script, as the parameters would not be harvested or displayed due to violation of the second parameter rule .