Tips to organize fiji macro code

I am writing a code in fiji macro language and it is getting very long. Is there any way to organize the code? Like adding ‘line’ between sections similar to %% in matlab.
Any suggestion is greatly appreciated.

double backslash // is the comment syntax in the IJ macro language.

1 Like

@Wilson_Adams I know that.
I am interested to add line between sections of the code

There’s no way to section code like that in the native IJ macro writer, unfortunately.

2 Likes

A proper organization includes the creation of functions for specific tasks. This way, you can keep your main section at a length of very few lines, and organize tasks into readable short parts of code.

If you like the way you can separate sections in Matlab, I recommend looking at Jupyter notebooks, where you can run single code cells (that serve a very similar purpose as Matlab sections). The ImageJ tutorials contain a few examples:

2 Likes