omeis.providers.re
Class RGBAIntBuffer

java.lang.Object
  extended by omeis.providers.re.RGBBuffer
      extended by omeis.providers.re.RGBAIntBuffer
All Implemented Interfaces:
Serializable

public class RGBAIntBuffer
extends RGBBuffer

Holds the data of an RGBA image. The image data is stored as a packed integer in the format RGBA. Note that Java color objects are stored in ARGB.

Since:
OME2.2
Version:
2.2 (Internal version: $Revision: 1574 $ $Date: 2005/06/22 17:09:48 $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk,
Andrea Falconi      a.falconi@dundee.ac.uk
See Also:
Serialized Form

Field Summary
 
Fields inherited from class omeis.providers.re.RGBBuffer
B_BAND, G_BAND, R_BAND
 
Constructor Summary
RGBAIntBuffer(int sizeX1, int sizeX2)
          Creates a new 4-band packed integer buffer.
 
Method Summary
 byte getBlueValue(int index)
          Retrieves the Blue value for a particular pixel index.
 int[] getDataBuffer()
          Retrieves the data buffer that contains the pixel values.
 byte getGreenValue(int index)
          Retrieves the Green value for a particular pixel index.
 byte getRedValue(int index)
          Retrieves the Red value for a particular pixel index.
 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 omeis.providers.re.RGBBuffer
getBlueBand, getGreenBand, getRedBand, getSizeX1, getSizeX2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RGBAIntBuffer

public RGBAIntBuffer(int sizeX1,
                     int sizeX2)
Creates a new 4-band packed integer buffer.

Parameters:
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.
See Also:
RGBBuffer.bands
Method Detail

setRedValue

public void setRedValue(int index,
                        int value)
Sets the Red value for a particular pixel index.

Overrides:
setRedValue in class RGBBuffer
Parameters:
index - The index in the band array.
value - The pixel value to set.

setGreenValue

public void setGreenValue(int index,
                          int value)
Sets the Green value for a particular pixel index.

Overrides:
setGreenValue in class RGBBuffer
Parameters:
index - The index in the band array.
value - The pixel value to set.

setBlueValue

public void setBlueValue(int index,
                         int value)
Sets the Blue value for a particular pixel index.

Overrides:
setBlueValue in class RGBBuffer
Parameters:
index - The index in the band array.
value - The pixel value to set.

getRedValue

public byte getRedValue(int index)
Retrieves the Red value for a particular pixel index.

Overrides:
getRedValue in class RGBBuffer
Parameters:
index - The index in the band array.
Returns:
The pixel value at the index.

getGreenValue

public byte getGreenValue(int index)
Retrieves the Green value for a particular pixel index.

Overrides:
getGreenValue in class RGBBuffer
Parameters:
index - The index in the band array.
Returns:
The pixel value at the index.

getBlueValue

public byte getBlueValue(int index)
Retrieves the Blue value for a particular pixel index.

Overrides:
getBlueValue in class RGBBuffer
Parameters:
index - The index in the band array.
Returns:
The pixel value at the index.

getDataBuffer

public int[] getDataBuffer()
Retrieves the data buffer that contains the pixel values.

Returns:
an integer array containing pixel values.

zero

public void zero()
Description copied from class: RGBBuffer
Zeros out (sets every pixel offset to zero) each band.

Overrides:
zero in class RGBBuffer


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.