imagej / imagej/imagej2

Handling default values with script parameters

Open
#177 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

Hi,
When using script parameters to take information from user , how to set up default values for String, Boolean, and Integer? The code below does not work. For example, the Integer "Threshold" does not show the value at the first time and if I key in a value, it will always show the last value I put in and do not show the default value. Does anyone knows why?

```
# @String(label="Yes or No? (Default=Yes)",choices={"No", "Yes"}, style="radioButtonHorizontal", value="Yes") M
# @Boolean(label="Checked the process? (Default=Not checked)", value=false) N
# @Integer(label="Threshold (%). (Default=46%)",value=46) Threshold
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Begin by reproducing the three script-parameter declarations shown in the issue and inspect the script-parameter handling entry point that creates their inputs and stores submitted values. Confirm the expected behavior for String, Boolean, and Integer defaults on first display and after entering a value, then add or update coverage for those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.