[Bug 606] New: LUT list in Log

9 views
Skip to first unread message

bugz...@fiji.sc

unread,
May 14, 2013, 10:33:08 AM5/14/13
to fiji-...@googlegroups.com
Bug ID 606
Summary LUT list in Log
Classification Unclassified
Product Fiji
Version unspecified
Hardware PC
OS Windows
Status NEW
Severity normal
Priority P4
Component Plugins
Assignee fiji-...@googlegroups.com
Reporter olivier...@u-clermont1.fr
CC olivier...@u-clermont1.fr

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


You are receiving this mail because:
  • You are the assignee for the bug.

bugz...@fiji.sc

unread,
May 14, 2013, 2:36:47 PM5/14/13
to fiji-...@googlegroups.com
Johannes Schindelin changed bug 606
What Removed Added
Status NEW ASSIGNED
CC   johannes....@gmx.de

Comment # 1 on bug 606 from Johannes Schindelin
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.)

Olivier BARDOT

unread,
May 15, 2013, 5:31:09 AM5/15/13
to bugz...@fiji.sc
  • You are on the CC list for the bug.
  • You reported the bug.

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.

--
Olivier BARDOT - olivier...@udamail.fr
MCU
Universit´ d'Auvergne
GReD UMR CNRS 6293, INSERM U1103 Clermont Université
GroMoE Growth and Morphogenesis of Epithelia
http://www.gred-clermont.fr/ 

Université d'Auvergne
Plateau Campus les Cézeaux - B.P. 86 - 63172 AUBIERE

bugz...@fiji.sc

unread,
May 15, 2013, 1:02:08 PM5/15/13
to fiji-...@googlegroups.com

Comment # 2 on bug 606 from Johannes Schindelin
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.


bugz...@fiji.sc

unread,
May 16, 2013, 3:15:49 AM5/16/13
to fiji-...@googlegroups.com

Comment # 3 on bug 606 from olivier bardot
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.


bugz...@fiji.sc

unread,
Jul 7, 2013, 11:32:27 AM7/7/13
to fiji-...@googlegroups.com
What Removed Added
Status ASSIGNED RESOLVED
Resolution --- WORKSFORME

Comment # 4 on bug 606 from Johannes Schindelin
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");

bugz...@fiji.sc

unread,
Jul 8, 2013, 4:00:49 AM7/8/13
to fiji-...@googlegroups.com

Comment # 5 on bug 606 from olivier bardot
Hello
I can reproduce by running your macro twice.
The LOG window opens and is filled with the complete list of the different
LUTs.

bugz...@fiji.sc

unread,
Jul 8, 2013, 4:01:54 AM7/8/13
to fiji-...@googlegroups.com
olivier bardot changed bug 606
What Removed Added
Status RESOLVED REOPENED
Resolution WORKSFORME ---

bugz...@fiji.sc

unread,
Jul 8, 2013, 11:13:59 AM7/8/13
to fiji-...@googlegroups.com
Johannes Schindelin changed bug 606
What Removed Added
Status REOPENED RESOLVED
Resolution --- FIXED

Comment # 6 on bug 606 from Johannes Schindelin
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.

Reply all
Reply to author
Forward
0 new messages