Login  Register

Re: JACop batch processing

Posted by Neil Fazel on Aug 12, 2014; 7:05pm
URL: http://imagej.273.s1.nabble.com/JACop-batch-processing-tp5009015p5009149.html

>The problem once again, is that y macro is specific for one image that I used to record the macro

runMacro() takes a 2nd argument which you can use to pass a parameter to the macro being called. Use that to pass the name of the file you would like the macro to process. Then modify the called macro to get the argument via a call to getArgument() and use that to programmatically replace all the hard-coded file names from the Macro Recorder.

Neil

This is from the macro manual:

getArgument()
Returns the string argument passed to macros called by runMacro(macro, arg),eval(macro), IJ.runMacro(macro,
arg) or IJ.runMacroFile(path, arg).

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html