MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getLuts

Method getLuts

ij/src/main/java/ij/IJ.java:2571–2587  ·  view source on GitHub ↗

Returns, as an array of strings, a list of the LUTs in the Image/Lookup Tables menu. @see LutLoader#getLut See also: Help>Examples>JavaScript/Show all LUTs and Image/Color/Display LUTs

()

Source from the content-addressed store, hash-verified

2569 * and Image/Color/Display LUTs
2570 */
2571 public static String[] getLuts() {
2572 ArrayList list = new ArrayList();
2573 Hashtable commands = Menus.getCommands();
2574 Menu lutsMenu = Menus.getImageJMenu("Image>Lookup Tables");
2575 if (commands==null || lutsMenu==null)
2576 return new String[0];
2577 for (int i=0; i<lutsMenu.getItemCount(); i++) {
2578 MenuItem menuItem = lutsMenu.getItem(i);
2579 String label = menuItem.getLabel();
2580 if (label.equals("-") || label.equals("Invert LUT") || label.equals("Apply LUT"))
2581 continue;
2582 String command = (String)commands.get(label);
2583 if (command==null || command.startsWith("ij.plugin.LutLoader"))
2584 list.add(label);
2585 }
2586 return (String[])list.toArray(new String[list.size()]);
2587 }
2588
2589 static void abort() {
2590 if ((ij!=null || Interpreter.isBatchMode()) && macroInterpreter==null)

Callers 2

getListMethod · 0.95
showParametersDialogMethod · 0.95

Calls 9

getCommandsMethod · 0.95
getImageJMenuMethod · 0.95
startsWithMethod · 0.80
getLabelMethod · 0.65
addMethod · 0.65
equalsMethod · 0.45
getMethod · 0.45
toArrayMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected