run_macro
Execute ImageJ1 macro code in the current Fiji session. Returns the macro return value and tail of the ImageJ log.
Instructions
Execute ImageJ1 macro text in the current Fiji session. Returns macro return value and a tail of the ImageJ log. Prefer small, focused macros; increase timeout for heavy I/O.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macro_code | Yes | ImageJ macro language source, e.g. run("Gaussian Blur...", "sigma=2"); | |
| retries | No | Number of retries on transient Java bridge failures (macro tools). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Macro finished without raising on the Java side. | |
| result | Yes | String return value from ImageJ1.runMacro, often empty. | |
| log_tail | Yes | Tail of the ImageJ log window (last ~4000 chars), useful for debugging. |