Many people are asking here in image.sc how to start working with macros.
The questions are often related to specific use cases.
Besides their specific details, the beginners’ questions are mostly about basic handling and basic operations of macros, such as
- loop over files in a folder
- loop over pixels
- working with RoiManager or ResultsTable etc.
To avoid duplication, all relevant answers to general macro issues can be collected here to create a reusable reference.
(In this sense all contributors are asked to keep this post as clear and structured as possible. Here should be not the place for specific discussions.)
The ImageJ macro language is a very powerful tool to automate your work with ImageJ/FIJI or to create customized commands for your recurrent work.
Because of the huge capabilities of the macro language the information and instructions can be overwhelming.
Getting started is not rocket science – once you found a good entry.
Your places to start
Place I to start is the \macro folder in your ImageJ/FIJI installation.
There you can find dozens of macros which can be used as examples or templates. And with a bit luck you will find something close to your needs.
All these macros can also be found on the ImageJ website under:
Place II to start is the list of Built-in Macro Functions:
Place III to start is the ImageJ Macro Language Programmer’s Reference Guide:
Place IV to start is a good Introduction into Macro Programming:
… more info to come …