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)
| 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(); |
nothing calls this directly
no test coverage detected