ImageJ Merge Channels in Macro with parameters

To correct this statement. It is possible to use arguments using:
run(“Merge Channels…”, c1=&stack2 c7=&stack1");

As specified here: https://imagej.nih.gov/ij/developer/macro/macros.html

With ImageJ 1.43 and later, there is an easier method that only requires adding “&” to the variable name in the options string:

noise = 50; output = “Point Selection”; run(“Find Maxima…”, “noise=&noise output=&output light”);`

String variables passed using this method do not have to be enclosed in brackets. For more examples, see the ArgumentPassingDemo macro.

Learning everyday something new here =)

3 Likes

Thanks for explaining this. It’s great to understand why and how things are happening. Learning this is sometimes like trying to put together a 3000-piece jigsaw puzzle :thinking: and very rewarding.

1 Like