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

Method getLut

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

Returns the LUT 'name' as an IndexColorModel, where 'name' can be any entry in the Image/Lookup Tables menu. @see ij.IJ#getLuts See: Help>Examples>JavaScript/Show all LUTs

(String name)

Source from the content-addressed store, hash-verified

27 * See: Help>Examples>JavaScript/Show all LUTs
28 */
29 public static IndexColorModel getLut(String name) {
30 if (name==null) return null;
31 LutLoader ll = new LutLoader();
32 FileInfo fi = ll.getBuiltInLut(name.toLowerCase());
33 if (fi.fileName!=null)
34 return new IndexColorModel(8, 256, fi.reds, fi.greens, fi.blues);
35 String path = IJ.getDir("luts")+name+".lut";
36 IndexColorModel lut = LutLoader.openLut("noerror:"+path);
37 if (lut==null) {
38 path = IJ.getDir("luts")+name.replaceAll(" ","_")+".lut";
39 lut = LutLoader.openLut("noerror:"+path);
40 }
41 return lut;
42 }
43
44 /** If 'arg'="", displays a file open dialog and opens the specified
45 LUT. If 'arg' is a path, opens the LUT specified by the path. If

Callers 5

previewLUTMethod · 0.95
setImageMethod · 0.45
reduceMethod · 0.45
zScaleMethod · 0.45

Calls 4

getBuiltInLutMethod · 0.95
getDirMethod · 0.95
openLutMethod · 0.95
replaceAllMethod · 0.80

Tested by

no test coverage detected