Hi Melissa,
Unfortunately, it got more complicated. I need to be able to run this in headless mode.
When I run my gutted script (only importer and exporter plugins, in my original post) using Fiji + LOCI 4.5 in -macro mode, it works.
- Code: Select all
~/bin/Fiji.app/ImageJ-linux64 --no-splash -macro stabilize.ijm test_in.tif:test_out.tif
When I run it in -batch mode it seems to work.
- Code: Select all
~/bin/Fiji.app/ImageJ-linux64 --no-splash -batch stabilize.ijm test_in.tif:test_out.tif
When I run it in --headless mode, I get the following error:
- Code: Select all
~/bin/Fiji.app/ImageJ-linux64 --no-splash --headless stabilize.ijm test_in.tif:test_out.tif
Error:- Code: Select all
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at ij.Command.runPlugIn(Command.java:148)
at ij.Command.runCommand(Command.java:97)
at ij.Executer.run(Executer.java:64)
at ij.IJ.run(IJ.java:259)
at ij.macro.Functions.doRun(Functions.java:586)
at ij.macro.Functions.doFunction(Functions.java:89)
at ij.macro.Interpreter.doStatement(Interpreter.java:219)
at ij.macro.Interpreter.doStatements(Interpreter.java:207)
at ij.macro.Interpreter.run(Interpreter.java:104)
at ij.macro.Interpreter.run(Interpreter.java:74)
at ij.macro.Interpreter.run(Interpreter.java:85)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:120)
at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:104)
at ij.IJ.runMacroFile(IJ.java:127)
at ij.ImageJ.main(ImageJ.java:678)
at fiji.Main.main(Main.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at imagej.ClassLauncher.launch(ClassLauncher.java:224)
at imagej.ClassLauncher.run(ClassLauncher.java:161)
at imagej.ClassLauncher.main(ClassLauncher.java:72)
Caused by: java.lang.VerifyError: (class: loci/plugins/in/MainDialog, method: rebuildDialog signature: (Lij/gui/GenericDialog;)V) Incompatible argument to function
at loci.plugins.in.ImporterPrompter.promptMain(ImporterPrompter.java:128)
at loci.plugins.in.ImporterPrompter.statusUpdated(ImporterPrompter.java:81)
at loci.plugins.in.ImportProcess.notifyListeners(ImportProcess.java:463)
at loci.plugins.in.ImportProcess.step(ImportProcess.java:756)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:144)
at loci.plugins.in.Importer.showDialogs(Importer.java:141)
at loci.plugins.in.Importer.run(Importer.java:79)
at loci.plugins.LociImporter.run(LociImporter.java:81)
at ij.IJ.runUserPlugIn(IJ.java:193)
at ij.IJ.runPlugIn(IJ.java:160)
... 27 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at ij.Command.runPlugIn(Command.java:148)
at ij.Command.runCommand(Command.java:97)
at ij.Executer.run(Executer.java:64)
at ij.IJ.run(IJ.java:259)
at ij.macro.Functions.doRun(Functions.java:586)
at ij.macro.Functions.doFunction(Functions.java:89)
at ij.macro.Interpreter.doStatement(Interpreter.java:219)
at ij.macro.Interpreter.doStatements(Interpreter.java:207)
at ij.macro.Interpreter.run(Interpreter.java:104)
at ij.macro.Interpreter.run(Interpreter.java:74)
at ij.macro.Interpreter.run(Interpreter.java:85)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:120)
at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:104)
at ij.IJ.runMacroFile(IJ.java:127)
at ij.ImageJ.main(ImageJ.java:678)
at fiji.Main.main(Main.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at imagej.ClassLauncher.launch(ClassLauncher.java:224)
at imagej.ClassLauncher.run(ClassLauncher.java:161)
at imagej.ClassLauncher.main(ClassLauncher.java:72)
Caused by: java.lang.VerifyError: (class: loci/plugins/in/MainDialog, method: rebuildDialog signature: (Lij/gui/GenericDialog;)V) Incompatible argument to function
at loci.plugins.in.ImporterPrompter.promptMain(ImporterPrompter.java:128)
at loci.plugins.in.ImporterPrompter.statusUpdated(ImporterPrompter.java:81)
at loci.plugins.in.ImportProcess.notifyListeners(ImportProcess.java:463)
at loci.plugins.in.ImportProcess.step(ImportProcess.java:756)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:144)
at loci.plugins.in.Importer.showDialogs(Importer.java:141)
at loci.plugins.in.Importer.run(Importer.java:79)
at loci.plugins.LociImporter.run(LociImporter.java:81)
at ij.IJ.runUserPlugIn(IJ.java:193)
at ij.IJ.runPlugIn(IJ.java:160)
... 27 more
I also have an
unrelated error, but maybe someone has experience with it. When I try to both use --headless mode and pass arguments to java, similar to the last command above (--headless mode), as in:
- Code: Select all
~/bin/Fiji.app/ImageJ-linux64 -Xms8g -Xmx8g --no-splash --headless stabilize.ijm test_in.tif:test_out.tif
I get the following error:
- Code: Select all
--headless without a parameter?
So, it can obviously see the parameters for --headless, because it does so when I don't pass the java arguments -Xms8g -Xmx8g. Is there some tricky syntax that I'm missing?
Thanks for your time.
William