public class RGBBuffer extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
RGBBuffer()
Simple constructor to avoid memory allocations.
|
|
RGBBuffer(int sizeX1,
int sizeX2)
Creates a new 3-band buffer.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int R_BAND
public static final int G_BAND
public static final int B_BAND
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
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()
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.