|
Bugzilla – Bug 606 |
LUT list in Log |
Last modified: 2013-07-08 10:13:59 CDT |
| ⚠ |
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. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
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.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.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");