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

Method isGrayscale

ij/src/main/java/ij/LookUpTable.java:73–81  ·  view source on GitHub ↗

Returns true if this is a 256 entry grayscale LUT. @see ij.process.ImageProcessor#isColorLut

()

Source from the content-addressed store, hash-verified

71 @see ij.process.ImageProcessor#isColorLut
72 */
73 public boolean isGrayscale() {
74 boolean isGray = true;
75 if (mapSize < 256)
76 return false;
77 for (int i=0; i<mapSize; i++)
78 if ((rLUT[i] != gLUT[i]) || (gLUT[i] != bLUT[i]))
79 isGray = false;
80 return isGray;
81 }
82
83 /** Draws a color bar with the LUT, with a black rectangle around.
84 * 'x' is the coordinate of the field for the lowest LUT color.

Callers 2

getFileInfoMethod · 0.95
runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected