ImageJ Server remote Macro execution

imagej-legacy
imagej-server
macro
Tags: #<Tag:0x00007fb87d2a6c68> #<Tag:0x00007fb87d2a6a60> #<Tag:0x00007fb87d2a6880>

#1

Hello everyone,

I’d like to execute a macro remotely using the ImageJ Server. Unfortunatelly, I didn’t find any applicable ImageJ2 call for executing macros. ImageJ1 provides a method for running macros ij.macro.MacroRunner, however its ImageJ Server representation legacy:ij.plugin.Macro_Runner does not have any inputs or outputs. What would be the best way to implement such call? Create a new ImageJ2 plugin acting as a wrapper through the LegacyService? Or modify the ImageJ Server “legacy calls” to accept String arguments for ImageJ1 calls?

Any feedback from you is greatly appreciated.


#2

Run the macro using the net.imagej.server.external.ScriptEval module. Try ij1 or IJ1 Macro for the language. Be warned that running macros headless has many limitations: for example, you cannot use the ROI Manager. I would use the --ij2 --headless --run command line syntax to test it out locally before trying to use it via client-server mechanism.