Login  Register

blank images when macro run from script vs terminal

Posted by Steve Huntley on Aug 06, 2011; 8:52am
URL: http://imagej.273.s1.nabble.com/blank-images-when-macro-run-from-script-vs-terminal-tp3683601.html

I've written a macro that uses the Layers plugin
(http://www.optinav.com/Layers.htm) to turn an image stack into a single
image, the generated composite image is then saved to disk by the macro.

The macro works flawlessly when I run it by starting ImageJ from a
terminal command line using the -macro switch to reference the macro
script.  Now that it is working I want to incorporate it into a cgi
script to be called by a web server, using exactly the same settings as
used in the command line.  But when I start things from the cgi script,
the generated composite image is blank and the resulting saved file is
empty.  I can see ImageJ starting and loading the image stack as
expected, but the composite image window when the plugin creates it is
always blank.

My machine is a Mac Pro running Snow Leopard, and I'm using ImageJ
1.45k.  If it were Unix I would check the X Server related environment
variables set in my cgi script.  But I'm not so familiar with the Mac's
visual systems.  Knowing what little I know I can't imagine why it
should make a difference that I'm calling the macro from a script as
opposed to a terminal window.  Is there some OS configuration value or
environment variable that I should have set in my cgi script before
calling ImageJ?

Any hints would be appreciated.

Thanks,
Steve Huntley