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 606 - LUT list in Log
LUT list in Log
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2013-05-14 09:33 CDT by olivier bardot
Modified: 2013-07-08 10:13 CDT
2 users (show)

See Also:

Description olivier bardot 2013-05-14 09:33:08 CDT
Hello
When I use the Image>Hyperstacks>temporal-color code, a list of LUT is printed in the Log. The Log file is filled wery quickly.

Information about your version of Java:

  os.arch => x86
  os.name => Windows XP
  os.version => 5.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) Client VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\DOCUME~1\olbardot\MESDOC~1\Labo\LOGICI~1\Fiji.app/java/win32/jdk1.6.0_24//jre
  ij.dir => C:\DOCUME~1\olbardot\MESDOC~1\Labo\LOGICI~1\Fiji.app

Information about the version of each plugin:

null
Comment 1 Johannes Schindelin 2013-05-14 13:36:47 CDT
That plugin is actually a macro and by pressing the Shift key while clicking on the menu item, you open the macro in the Script Editor instead of running it.

This should give you the opportunity to identify what needs to be changed. (Yes, I am asking for your assistance here... Unfortunately, I have a lot on my plate currently... but at least I hope to give you a chance to have your bug fixed faster that way.)
Comment 2 Johannes Schindelin 2013-05-15 12:02:08 CDT
The OP sent this via mail by mistake rather than adding a comment in the web interface:

-- snipsnap --
Hello
There is a hidden print (IJ.log) in the following script :

eval("script", "importClass(Packages.ij.IJ);\n"
+ "\n"
+ "result = [];\n"
+ "if (IJ.getInstance() != null) {\n"
+ " importClass(Packages.fiji.User_Plugins);\n"
+ " importClass(Packages.ij.Menus);\n"
+ "\n"
+ " commands = Menus.getCommands();\n"
+ " lutsMenu = User_Plugins.getMenu('Image>Lookup Tables');\n"
+ " if (lutsMenu != null) {\n"
+ " for (i = 0; i < lutsMenu.getItemCount(); i++) {\n"
+ " menuItem = lutsMenu.getItem(i);\n"
+ " if (menuItem.getActionListeners().length == 0) {\n"
+ " // is a separator\n"
+ " continue;\n"
+ " }\n"
+ " label = menuItem.getLabel();\n"
+ " if (label.equals('Invert LUT') || label.equals('Apply LUT')) {\n"
+ " // no lookup table\n"
+ " continue;\n"
+ " }\n"
+ " command = commands.get(label);\n"
+ " if (command == null || command.startsWith('ij.plugin.LutLoader')) {\n"

Here the label list is printed from this command.

+ " result.push(label);\n"

Label is an array that contains the liste of LUT.

+ " }\n"
+ " }\n"
+ " }\n"
+ "}\n"
+ "// ImageJ's eval('script', script) erroneously always returns null\n"
+ "System.setProperty('result', result.join('\\n'));\n");
return split(call("java.lang.System.getProperty", "result"), "\n");
Hope this helps.
Comment 3 olivier bardot 2013-05-16 02:15:49 CDT
Hello
There is a hidden print to the log in the following script : 
eval("script", "importClass(Packages.ij.IJ);\n"
+ "\n"
+ "result = [];\n"
+ "if (IJ.getInstance() != null) {\n"
+ " importClass(Packages.fiji.User_Plugins);\n"
+ " importClass(Packages.ij.Menus);\n"
+ "\n"
+ " commands = Menus.getCommands();\n"
+ " lutsMenu = User_Plugins.getMenu('Image>Lookup Tables');\n"
+ " if (lutsMenu != null) {\n"
+ " for (i = 0; i < lutsMenu.getItemCount(); i++) {\n"
+ " menuItem = lutsMenu.getItem(i);\n"
+ " if (menuItem.getActionListeners().length == 0) {\n"
+ " // is a separator\n"
+ " continue;\n"
+ " }\n"
+ " label = menuItem.getLabel();\n"
+ " if (label.equals('Invert LUT') || label.equals('Apply LUT')) {\n"
+ " // no lookup table\n" + " continue;\n" 
+ " }\n"
+ " command = commands.get(label);\n"
+ " if (command == null || command.startsWith('ij.plugin.LutLoader')) {\n" 

Here the label list is printed from this command. 
+ " result.push(label);\n" 
Label is an array that contains the liste of LUT. 
+ " }\n"
+ " }\n
 + " }\n"
+ "}\n" + "// ImageJ's eval('script', script) erroneously always returns null\n" + "System.setProperty('result', result.join('\\n'));\n"); return split(call("java.lang.System.getProperty", "result"), "\n");
Hope this helps.
Comment 4 Johannes Schindelin 2013-07-07 10:32:27 CDT
Sorry, I do not see the 'print'. I also cannot reproduce the Log output. The statement 'result.push(label)' does *not* output anything here. This is the macro I recorded so you can see exactly what I tried to reproduce:

run("Mitosis (26MB, 5D stack)");
run("Reduce Dimensionality...", "  slices frames");
run("Temporal-Color Code", "lut=Fire start=1 end=51 create");
Comment 5 olivier bardot 2013-07-08 03:00:49 CDT
Hello
I can reproduce by running your macro twice.
The LOG window opens and is filled with the complete list of the different LUTs.
Comment 6 Johannes Schindelin 2013-07-08 10:13:59 CDT
Ah, finally the missing bit of information! The crucial bit that prevented me from reproducing was the fact that it only shows up *the second* time!

Please find the explanation of the real bug (hint: it is not that result.push() statement at all) here:

https://github.com/fiji/fiji/commit/f4dfbb51ac

Pushed and uploaded.