Returns true if this is a 256 entry grayscale LUT. @see ij.process.ImageProcessor#isColorLut
()
| 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. |
no outgoing calls
no test coverage detected