First recording#
Let's start the macro recorder and see what happens. Click on Plugins > Macro > Record...
. A wild window appears!
Now do the following:
- Open an image (e.g.
File > Open Samples > Blobs
). - Run the Variance filter (
Process > Filters > Variance...
) and clickOK
. - Change the look-up table to
HiLo
(Image > Lookup Tables > HiLo
). - Click on
Create
in the macro recorder window. This will open a new window. - Close the image.
- Click on
Run
in the macro window.
What happened?#
The macro recorder recorded all the actions you did in Fiji, and precisely reproduced the steps once you ran it.
Did you notice which window opened when you clicked on Create
? It is the macro editor!
That means that we can use the macro recorder to add steps to our macro, and then edit it to make it more useful.
Command calls#
The macro recorder captures functions that are used internally to call ImageJ commands. One such is the run
function. It often looks something like this:
In this case, the run
function is used to call the Gaussian blur plugin. The first argument is the name of the command, and the second is the parameters that are passed to the command. In this case, the parameter is the sigma value of the Gaussian blur.
Some commands will require more parameters than others.