Macro are made to streamline your analysis
Simply put, an ImageJ macro is a succession of existing ImageJ commands. Once you have defined exactly the type of analysis you would like to eprfom on your images, it is worth creating a macro with the different steps. This as two advantages.
First, it help you keep track of all the steps you used in your analysis. If you need to do the same analysis a year later, or ou want to check which algorithm you used when writing the paper, macro are perfect for that. They are a nice way to keep track of eveything manipulation and analysis you did on your images.
Secondly, if you need to make 1000 times the same analysis on your images, a macro is defenitivelly the way to do it. Define your pipeline on several test images. If possible pick them such as they represent the variability in your dataset. Record the step to create a macro and apply it on the whole dataset. It will save you a lot of time and avoid errors.
Record macro
> Plugins > Macros > Record...
ImageJ macro language is a simplified version of Java
The ImageJ macro language is a modified version of Java. Therefore, they share some similarities. Some examples below.
Commented lines start with //
Each line need to finish with an ;
But not foor loops start and end
The first element in a vector as the index 0
Look for existing plugins and macros
https://imagej.nih.gov/ij/plugins/
comments powered by Disqus