Login  Register

Re: run macro in command line

Posted by dscho on Oct 02, 2009; 2:51pm
URL: http://imagej.273.s1.nabble.com/run-macro-in-command-line-tp3690941p3690943.html

Hi,

On Fri, 2 Oct 2009, Lee S wrote:

> I would like to know how to run imageJ with my images for linking with an
> external homemade program.
>
> For example, I have an image in c:\program files\imageJ\1.tif (image file)
> and 1smacro.txt (macro).

        java -cp ij.jar ij.ImageJ -macro 1smacro.txt

> How can I let ImageJ know 1.tif as the input parameter?

You have to specify it in the macro.  You can run

        java -cp ij.jar ij.ImageJ 1.tif -macro 1smacro.txt

too, but there is no guarantee that 1.tif has been fully loaded before the
macro is evaluated.

Hth,
Dscho