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

Method createInvertedLut

ij/src/main/java/ij/process/LUT.java:67–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 }
66
67 public LUT createInvertedLut() {
68 int mapSize = getMapSize();
69 byte[] reds = new byte[mapSize];
70 byte[] greens = new byte[mapSize];
71 byte[] blues = new byte[mapSize];
72 byte[] reds2 = new byte[mapSize];
73 byte[] greens2 = new byte[mapSize];
74 byte[] blues2 = new byte[mapSize];
75 getReds(reds);
76 getGreens(greens);
77 getBlues(blues);
78 for (int i=0; i<mapSize; i++) {
79 reds2[i] = (byte)(reds[mapSize-i-1]&255);
80 greens2[i] = (byte)(greens[mapSize-i-1]&255);
81 blues2[i] = (byte)(blues[mapSize-i-1]&255);
82 }
83 return new LUT(8, mapSize, reds2, greens2, blues2);
84 }
85
86 /** Creates a color LUT from a Color. */
87 public static LUT createLutFromColor(Color color) {

Callers 1

invertLutMethod · 0.95

Calls 4

getRedsMethod · 0.95
getGreensMethod · 0.95
getBluesMethod · 0.95
getMapSizeMethod · 0.45

Tested by

no test coverage detected