Frage

I am wondering if I am running Fiji under --headless mode, what is the best way to pass the parameters to some macros? And what is the best way to return some message (ex. macro execute is done, or some error message)

For example, I have a macro that performs FFT for every single one image in a folder, then spitting out the results to another folder. If I'd like to type the input folder and the output folder as arguments in the command line that launch the macro. I would also like to know when the macro is done executing.

I read ImageJ running using command line, and it mentioned -macropath[arg] parameter, but without example, it is not clear to me what it can do, and whether it is what I am looking for.

Any pointer is appreciated. Thanks.

War es hilfreich?

Lösung

According to the example the last arg (/Users/wayne/images/stack1) will be available as a string within the macro and can be access via a call to the getArgument() function.

-macro analyze /Users/wayne/images/stack1

For completion output, try just using the print() function. I think this will get output to the console that you running the macro from.

print("My macro is finished!");
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top