NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 633 - QuickPalm (Analyse Particles) gives an error
QuickPalm (Analyse Particles) gives an error
Status: NEW
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
Other Linux
: P5 enhancement
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2013-07-14 15:08 CDT by Olex
Modified: 2013-07-17 07:19 CDT
1 user (show)

See Also:


Attachments
macros that I use to run on the cluster (552 bytes, text/plain)
2013-07-14 15:08 CDT, Olex

Description Olex 2013-07-14 15:08:46 CDT
Created attachment 109
macros that I use to run on the cluster

Dear Johannes,

I was able to run the "Analyse Particles" plug-in but not successfully. I do get .xls file with the results but no output images. 
I get the same error that you had despite merging all the changes in the code and also saving results to the .xls file the way you described: 

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:260)
        at ij.IJ.run(IJ.java:311)
        at QuickPALM.ReconstructionViewer.<init>(ReconstructionViewer.java:59)
        at QuickPALM.Analyse_Particles.run(Analyse_Particles.java:65)
        at ij.IJ.runUserPlugIn(IJ.java:194)
        at ij.IJ.runPlugIn(IJ.java:160)
        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:260)
        at ij.macro.Functions.doRun(Functions.java:589)
        at ij.macro.Functions.doFunction(Functions.java:89)
        at ij.macro.Interpreter.doStatement(Interpreter.java:219)
        at ij.macro.Interpreter.doBlock(Interpreter.java:553)
        at ij.macro.Interpreter.doStatement(Interpreter.java:255)
        at ij.macro.Interpreter.doFor(Interpreter.java:499)
        at ij.macro.Interpreter.doStatement(Interpreter.java:237)
        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:123)
        at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:107)
        at ij.IJ.runMacroFile(IJ.java:127)
        at ij.ImageJ.main(ImageJ.java:683)
        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.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
        at java.awt.Button.<init>(Button.java:135)
        at ij.plugin.filter.ScaleDialog.makeButtonPanel(ScaleDialog.java:116)
        at ij.plugin.filter.ScaleDialog.run(ScaleDialog.java:63)
        at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:262)
        at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:111)
        at ij.IJ.runPlugIn(IJ.java:168)


I am mostly interested in images produced by this plugin. I believe that "Analyse Particles" aborts somewhere in the middle of the run resulting in unprocessed images. 

P.S.: I merged all the changes that you made using command: git pull origin master. The current version of fiji is 1.47t.
Comment 1 Olex 2013-07-14 15:52:03 CDT
Apparently, I cannot separate channels before running Analyse Particles when running it on the cluster while I can separate channels and run Analyse Particles on windows using the same macros. 

Is it the limitation of the QuickPALM plugin for linux version? 
I noticed in Windows version that there is another "Analyse Particles..." in "Analyse" tab. How do I make sure that those two are not confused with the command : run("Analyse Particles","....)?
Comment 2 Johannes Schindelin 2013-07-14 16:27:57 CDT
Yep, sorry, I did not explain that very well... The changes I made were performed in ImageJ2! The reason is that we want to separate the responsibilities better between Fiji and ImageJ2: life-science-specific code should go into Fiji, general code into ImageJ2.

And the headless support is definitely not specific to life science :-)

So you did not get the fix when you updated you Fiji clone because the updates were in the ImageJ2 repository...

Here is a package that should work:

http://code.imagej.net/dscho/fiji-linux64-20130714040634.tar.tar.z2
Comment 3 Olex 2013-07-14 17:11:56 CDT
Thank you. But that is strange since I saw the update for NullPointerException in the https://github.com/fiji/fiji/commit/bc018523cd3d50e69cc27c30354ab1d66ffe7ec7. 

I downloaded the package from http://code.imagej.net/dscho/fiji-linux64-20130714040634.tar.tar.z2 and also made ImageJ-linux64 executable. When I try to run the same macros as in the attachment 109 I get an error: 
 java.lang.NullPointerException
        at fiji.Main.runGently(Main.java:39)
        at fiji.Main.runGently(Main.java:29)
        at fiji.MenuRefresher.installScripts(MenuRefresher.java:57)
        at fiji.MenuRefresher.run(MenuRefresher.java:38)
        at fiji.Main.setup(Main.java:106)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at ij.macro.Functions.call(Functions.java:3811)
        at ij.macro.Functions.getStringFunction(Functions.java:264)
        at ij.macro.Interpreter.getStringTerm(Interpreter.java:1237)
        at ij.macro.Interpreter.getString(Interpreter.java:1216)
        at ij.macro.Interpreter.doStatement(Interpreter.java:264)
        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:123)
        at ij.IJ.runMacro(IJ.java:112)
        at ij.IJ.runMacro(IJ.java:101)
        at ij.ImageJ.main(ImageJ.java:686)
        at fiji.Main.main(Main.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at imagej.ClassLauncher.launch(ClassLauncher.java:224)
        at imagej.ClassLauncher.run(ClassLauncher.java:161)
        at imagej.ClassLauncher.main(ClassLauncher.java:72)

Error while executing the main() method of class 'fiji.Main':
java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
        at java.awt.MenuComponent.<init>(MenuComponent.java:158)
        at java.awt.MenuItem.<init>(MenuItem.java:214)
        at java.awt.MenuItem.<init>(MenuItem.java:198)
        at java.awt.Menu.<init>(Menu.java:157)
        at java.awt.Menu.<init>(Menu.java:137)
        at ij.Menus.getMenu(Menus.java:690)
        at ij.Menus.getMenu(Menus.java:680)
        at ij.Menus.addMenuBar(Menus.java:105)
        at ij.IJ.init(IJ.java:325)
        at ij.IJ.runMacroFile(IJ.java:125)
        at ij.ImageJ.main(ImageJ.java:683)
        at fiji.Main.main(Main.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at imagej.ClassLauncher.launch(ClassLauncher.java:224)
        at imagej.ClassLauncher.run(ClassLauncher.java:161)
        at imagej.ClassLauncher.main(ClassLauncher.java:72)
Comment 4 Olex 2013-07-14 17:17:22 CDT
I apologize, I downloaded http://code.imagej.net/dscho/fiji-linux64-20130714040634.tar.tar.bz2 because it was the only one on the server.
Comment 5 Johannes Schindelin 2013-07-15 12:59:01 CDT
The merge you saw for fixing the NullPointerException was with regard to another null pointer exception...

And my apologies: somehow the ij-legacy file was not compiled properly in the .tar.bz2 file I uploaded for you (you found the correct file, BTW). So I recompiled it and uploaded it to

http://code.imagej.net/dscho/ij-legacy-2.0.0-SNAPSHOT.jar

Could you download that file and replace the version in your unpacked Fiji.app/jars/ and try again?
Comment 6 Olex 2013-07-15 13:54:31 CDT
I replaced the .jar file as you directed. I run command: 
./ImageJ-linux64 --headless -batch test_cluster.ijm
But I still get the same error(see below). What do you mean by unpacked? 

java.lang.NullPointerException
        at fiji.Main.runGently(Main.java:39)
        at fiji.Main.runGently(Main.java:29)
        at fiji.MenuRefresher.installScripts(MenuRefresher.java:57)
        at fiji.MenuRefresher.run(MenuRefresher.java:38)
        at fiji.Main.setup(Main.java:106)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                        java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                        sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at ij.macro.Functions.call(Functions.java:3811)
        at ij.macro.Functions.getStringFunction(Functions.java:264)
        at ij.macro.Interpreter.getStringTerm(Interpreter.java:1237)
        at ij.macro.Interpreter.getString(Interpreter.java:1216)
        at ij.macro.Interpreter.doStatement(Interpreter.java:264)
        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:123)
        at ij.IJ.runMacro(IJ.java:112)
        at ij.IJ.runMacro(IJ.java:101)
        at ij.ImageJ.main(ImageJ.java:686)
        at fiji.Main.main(Main.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                        java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                        sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at imagej.ClassLauncher.launch(ClassLauncher.java:224)
        at imagej.ClassLauncher.run(ClassLauncher.java:161)
        at imagej.ClassLauncher.main(ClassLauncher.java:72)

Error while executing the main() method of class 'fiji.Main':
java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:1                                                                                        73)
        at java.awt.MenuComponent.<init>(MenuComponent.java:158)
        at java.awt.MenuItem.<init>(MenuItem.java:214)
        at java.awt.MenuItem.<init>(MenuItem.java:198)
        at java.awt.Menu.<init>(Menu.java:157)
        at java.awt.Menu.<init>(Menu.java:137)
        at ij.Menus.getMenu(Menus.java:690)
        at ij.Menus.getMenu(Menus.java:680)
        at ij.Menus.addMenuBar(Menus.java:105)
        at ij.IJ.init(IJ.java:325)
        at ij.IJ.runMacroFile(IJ.java:125)
        at ij.ImageJ.main(ImageJ.java:683)
        at fiji.Main.main(Main.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                        java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                        sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at imagej.ClassLauncher.launch(ClassLauncher.java:224)
        at imagej.ClassLauncher.run(ClassLauncher.java:161)
        at imagej.ClassLauncher.main(ClassLauncher.java:72)
Comment 7 Johannes Schindelin 2013-07-15 14:44:30 CDT
Hmm. I will make another package, I guess.
Comment 8 Johannes Schindelin 2013-07-15 14:45:49 CDT
Uploaded: http://code.imagej.net/dscho/fiji-linux64-20130715024520.tar.tar.gz
Comment 9 Olex 2013-07-15 20:57:31 CDT
It works! Thank you for your effort.
Comment 10 Olex 2013-07-15 21:38:01 CDT
ImageJ results on Windows are different from ImageJ results on linux when running the same script. It seems that linux version has poorer quality. That is a mystery...
Comment 11 Johannes Schindelin 2013-07-16 09:14:49 CDT
I do not quite understand... which quality are you referring to?
Comment 12 Olex 2013-07-17 07:19:12 CDT
By the quality, I mean the quality of the resulting images after processing them with ImageJ2 together with QuickPalm plugin. Generally, I have small macros which takes a multi-framed image, splits the channels and then analyses each channel separately with the quickPALM plugin. After analysis and reconstruction I save the resulting images.

I have run this macros both on ImageJ-win64 version of the ImageJ2 (the one that I got from http://code.imagej.net/dscho/fiji-linux64-20130715024520.tar.tar.gz), and the same macros on ImageJ-linux64 (also from http://code.imagej.net/dscho/fiji-linux64-20130715024520.tar.tar.gz). The resulting images after reconstruction are different while I would expect them to be identical. 

Also ImageJ-linux64 gives me a warning in the command line that multichannel image is required. While ImageJ-win64.exe version of ImageJ2 does not complain and have the same results as ImageJ1 version.