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

Method run

ij/src/main/java/ij/plugin/LutLoader.java:47–70  ·  view source on GitHub ↗

If 'arg'="", displays a file open dialog and opens the specified LUT. If 'arg' is a path, opens the LUT specified by the path. If 'arg'="fire", "ice", etc., uses a method to generate the LUT.

(String arg)

Source from the content-addressed store, hash-verified

45 LUT. If 'arg' is a path, opens the LUT specified by the path. If
46 'arg'="fire", "ice", etc., uses a method to generate the LUT. */
47 public void run(String arg) {
48 if (arg.equals("invert")) {
49 invertLut();
50 return;
51 }
52
53 // Built in LUT
54 FileInfo fi = getBuiltInLut(arg);
55 if (fi.fileName!=null) {
56 showLut(fi, true);
57 Menus.updateMenus();
58 return;
59 }
60
61 // LUT in luts folder
62 OpenDialog od = new OpenDialog("Open LUT...", arg);
63 fi.directory = od.getDirectory();
64 fi.fileName = od.getFileName();
65 if (fi.fileName==null)
66 return;
67 if (openLut(fi))
68 showLut(fi, arg.equals(""));
69 IJ.showStatus("");
70 }
71
72 private FileInfo getBuiltInLut(String name) {
73 FileInfo fi = new FileInfo();

Callers

nothing calls this directly

Calls 9

invertLutMethod · 0.95
getBuiltInLutMethod · 0.95
showLutMethod · 0.95
updateMenusMethod · 0.95
getDirectoryMethod · 0.95
getFileNameMethod · 0.95
openLutMethod · 0.95
showStatusMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected