Running an ImageJ Macro in headless mode

Tags: #<Tag:0x00007fd542bbea80> #<Tag:0x00007fd542bbe918>


I have a large Macro that I would like to put under Continuous Integration. I’d like to have it process a number of files in an automated fashion and compare the results against expected results. The Macro however utilises a bunch of Dialogs to get the settings that are needed for running it. I’ve found that it is possible to run ImageJ in headless mode. When running the macro in Headless mode however, I cannot find a way to make choices in the dialogs.

Can anyone help? I’d like to know how to provide the dialogs with information while running from command line.

Thanks in advance!


If you run your macro interactively (after having placed the .ijm file – that needs to contain an underscore in the file name – somewhere in a subdirectory of ./ while running the macro recorder, it will record the necessary commands to call your macro without the dialogs (from another macro or headless from the command line).