fiji_module_run
Run Fiji/ImageJ modules, commands, menus, or Groovy scripts with JSON inputs, without opening dialogs, and return status, outputs, warnings, and errors. Start Fiji automatically and track long jobs.
Instructions
Run a module (command class, menu path, title, or the path of a script file) with inputs as a JSON object, e.g. {"sigma": 2, "image": "blobs.gif"}. Never opens the module's dialog: inputs not given keep their default; an object input with one live instance is bound to it, else pass its name (see fiji_objects). Returns status, outputs (objects by name, pictures as images), new objects, the modules it ran in turn (nested), and the warnings and errors it logged (messages). status is error when the module threw or reported success = false (error says why), canceled, or ok; ok with logged_errors (their number) and first_error means it ended normally but logged errors: check its outputs. Waits up to wait_seconds (default 30, at most 40: clients abort requests after about 60 s; follow a longer run with fiji_module_status). A run still going returns its job id, status running, and the titles of the modal dialogs open (dialogs); blocked_by_dialog means the job itself waits for a dialog. Starts Fiji first if it is not running: the first start downloads Fiji and ABBA and takes minutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | command title, menu path, class name, or script file path | |
| inputs | No | JSON object of input values by name, e.g. {"sigma": 2}; inputs not given keep their default | |
| wait_seconds | No | seconds to wait for the result before returning the job id (default 30, at most 40: clients abort requests after about 60 s; follow a longer run with fiji_module_status) |