|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectomeis.providers.re.RGBBuffer
public class RGBBuffer
Holds the data of an RGB image. The image data is stored in three byte arrays, one for each color band.
Field Summary | |
---|---|
static int |
B_BAND
Index of the blue band in the image's data buffer. |
static int |
G_BAND
Index of the green band in the image's data buffer. |
static int |
R_BAND
Index of the red band in the image's data buffer. |
Constructor Summary | |
---|---|
protected |
RGBBuffer()
Simple constructor to avoid memory allocations. |
|
RGBBuffer(int sizeX1,
int sizeX2)
Creates a new 3-band buffer. |
Method Summary | |
---|---|
byte[] |
getBlueBand()
Returns the data buffer for the blue band. |
byte |
getBlueValue(int index)
Retrieves the Blue value for a particular pixel index. |
byte[] |
getGreenBand()
Returns the data buffer for the green band. |
byte |
getGreenValue(int index)
Retrieves the Green value for a particular pixel index. |
byte[] |
getRedBand()
Returns the data buffer for the red band. |
byte |
getRedValue(int index)
Retrieves the Red value for a particular pixel index. |
int |
getSizeX1()
Returns the number of pixels on the X1-axis. |
int |
getSizeX2()
Returns the number of pixels on the X2-axis. |
void |
setBlueValue(int index,
int value)
Sets the Blue value for a particular pixel index. |
void |
setGreenValue(int index,
int value)
Sets the Green value for a particular pixel index. |
void |
setRedValue(int index,
int value)
Sets the Red value for a particular pixel index. |
void |
zero()
Zeros out (sets every pixel offset to zero) each band. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int R_BAND
public static final int G_BAND
public static final int B_BAND
Constructor Detail |
---|
protected RGBBuffer()
public RGBBuffer(int sizeX1, int sizeX2)
sizeX1
- The number of pixels on the X1-axis. This is the X-axis
in the case of an XY-plane or XZ-plane.
Otherwise it is the Z-axis ZY-plane.sizeX2
- The number of pixels on the X2-axis. This is the Y-axis
in the case of an XY-plane or ZY-plane.
Otherwise it is the Z-axis XZ-plane.bands
Method Detail |
---|
public byte[] getRedBand()
public byte[] getGreenBand()
public byte[] getBlueBand()
public int getSizeX1()
public int getSizeX2()
public void setRedValue(int index, int value)
index
- The index in the band array.value
- The pixel value to set.public void setGreenValue(int index, int value)
index
- The index in the band array.value
- The pixel value to set.public void setBlueValue(int index, int value)
index
- The index in the band array.value
- The pixel value to set.public byte getRedValue(int index)
index
- The index in the band array.
public byte getGreenValue(int index)
index
- The index in the band array.
public byte getBlueValue(int index)
index
- The index in the band array.
public void zero()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.