Stack conversion works from GUI and fails in headless mode


I have a macro that includes a line:

run(“Stack to RGB”, “frames”);

that executes correctly from the FIJI GUI but fails in headless mode with a message that begins with :

at ij.plugin.RGBStackConverter.dialogItemChanged(
at net.imagej.patcher.HeadlessGenericDialog.showDialog(
at ij.plugin.RGBStackConverter.showDialog(
at ij.plugin.RGBStackConverter.compositeToRGB(

The input is a composite stack.

I am trying to see if scripting this with jython instead of using the macro language will work but I’m not successful at that yet. My ultimate goal is to have a headless way to combine three single channel tif stacks into one RGB or composite stack that displays with only one slider for the time dimension (and none for the channels).

I’d appreciate guidance here and can create a MCVE if that’s helpful.


Good day Mark,

just a short first question:

Does the operation execute from a macro if you run run your macro from the macro (editor) window (Plugins >> New >> Macro)?



Hi Herbie,

Yes, when I have the macro in the macro editor window and select run, it executes correctly.


Ok thanks, then your issue needs some attention of the ImageJ informatics-experts.

I’m sure they will soon chime in!

Good luck