|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.beans.masks.data.PixelUtil
public final class PixelUtil
Contains utility methods for pixel conversion. We define pixels as an integer that represents an RGB value. The ColorProcessor in ImageJ using an int[] array to represent its pixels, and every element of this int array is a pixel in this RGB format. Anytime we use the term "Pixel", we will be referring to this definition.
Method Summary | |
---|---|
static int |
byteToUnsignedInt(byte b)
Converts a byte (-128 to 127) to an unsigned int, which ranges from 0 - 255. |
static int |
colorToPixel(java.awt.Color color)
Converts a java.awt.Color into a int pixel. |
static java.awt.Color |
hsbToColor(HsbPixel hsbPixel)
Converts an HsbPixel into a java.awt.Color |
static int |
hsbToPixel(HsbPixel hsb)
Converts an hsb pixel to a imagej-ready pixel. |
static java.awt.Color |
pixelToColor(int pixel)
Converts a int pixel into a java.awt.Color |
static HsbPixel |
pixelToHsb(int pixel)
Converts an int pixel into an HsbPixel. |
static byte |
unsignedIntToByte(int i)
Converts an unsigned int from 0 - 255 into a byte (-128 to 127). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int colorToPixel(java.awt.Color color)
public static java.awt.Color pixelToColor(int pixel)
public static java.awt.Color hsbToColor(HsbPixel hsbPixel)
public static int hsbToPixel(HsbPixel hsb)
public static HsbPixel pixelToHsb(int pixel)
public static int byteToUnsignedInt(byte b)
public static byte unsignedIntToByte(int i)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |