Running macros in batch process mode
In the previous sections, we looked at processing a folder using a macro with different processing functions. The method described earlier is very flexible and powerful, and allows a great deal of control over the processing flow and what will be processed. ImageJ, however, also has a method that can perform a similar task, which is the batch process command. This command allows you to run a specified macro that you created over a folder and allows you to store the results in the same or a different folder. To start the batch process command, go to Process | Batch | Macro… in the ImageJ menu, which will open the following dialog:
You can set the input and output folders using the buttons. You can also set the output format. If you don't set the output folder, the image would not be saved unless you saved it within your own code. You can use one of the macros that come with ImageJ using the Add Macro Code selector, or you can use the Open… button to load...