com.esri.sde.sdk.client
Class SeRasterRenderedImage

java.lang.Object
  extended by com.esri.sde.sdk.client.SeRasterRenderedImage
All Implemented Interfaces:
SeRasterConsumer

public class SeRasterRenderedImage
extends java.lang.Object
implements SeRasterConsumer

The SeRasterRenderedImage class implements a SeRasterConsumer which can be attached to a SeRasterProducer object to retrieve image scan_lines and optionally bit_mask.

Since:
ArcSDE 9.0
See Also:
SeInsert, SeRow, SeRasterAttr, SeRasterConsumer, SeRasterProducer, SeRasterRenderedTile

Field Summary
 
Fields inherited from interface com.esri.sde.sdk.client.SeRasterConsumer
COMPLETESCANLINES, COMPLETETILES, IMAGEABORTED, IMAGEERROR, SINGLEFRAMEDONE, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
SeRasterRenderedImage(SeRasterProducer rp)
          Constructor method.
 
Method Summary
 void rasterComplete(int status)
          The rasterComplete method is part of the SeRasterConsumer API which this class must implement to retrieve the raster data.
 void setHints(int hints)
          The setHints method: No operation.
 void setProperties(java.util.Hashtable props)
          The setProperties method: No operation.
 void setRasterTiles(SeRasterTile[] rasTiles)
          This is a no operation method.
 void setScanLines(int numLines, byte[] scanLines, byte[] bitMask)
          Sets raster image in scan lines form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeRasterRenderedImage

public SeRasterRenderedImage(SeRasterProducer rp)
Constructor method.

Parameters:
rp - a SeRasterProducer value.
See Also:
SeRasterConsumer, SeRasterProducer
Method Detail

setHints

public void setHints(int hints)
The setHints method: No operation.

Specified by:
setHints in interface SeRasterConsumer

setProperties

public void setProperties(java.util.Hashtable props)
The setProperties method: No operation.

Specified by:
setProperties in interface SeRasterConsumer

setRasterTiles

public void setRasterTiles(SeRasterTile[] rasTiles)
This is a no operation method.

Specified by:
setRasterTiles in interface SeRasterConsumer
Parameters:
rasTiles - a SeRasterTile[] value.
See Also:
SeRasterAttr.setImportMode(boolean), SeRasterRenderedTile.setRasterTiles(com.esri.sde.sdk.client.SeRasterTile[])

setScanLines

public void setScanLines(int numLines,
                         byte[] scanLines,
                         byte[] bitMask)
Sets raster image in scan lines form. This is the callback method to get raster data from user. ScanLineMode: (Default) Expect data in scan line form and in top-down, left-to-right order. (@link SeRasterRenderedImage} class is implemented to use this method. Sets one or more image scan line of pixel data for any type of support pixel depth and each scan line must end on a byte boundary. For instance, if (BitsPerPixel < 8 && num_lines > 1) then the scan lines are expected to be unpack if the last pixel value does not end on byte boundary. If mask_mode is set, then also sets bit mask which is always ONE bit per pixel and fully packed byte array. Not validation is done at this level. It is done in SeStream level instead.

For example:

 // Assumes
 int mBitsPerPixel = 1;  
 int mBandWidth    = 3;  
 int mBytesPerLine = (mBandWidth * mBitsPerPixel + 7) / 8;

 int numLines      = 3;

 // Expected scanLines parameter would have the 
 // following format and layout
 int    i_lineLen = 3;                         // mBytesPerLine * numLines
 byte[] scanLines = new byte[i_lineLen];

 // Now set scanLines := [aaa?????][bbb?????][ccc?????]
 //
 // where [ ]  --  Indicate a byte. Each char within represent one bit value
 //       abc  --  Indicate pixel value. In this case a 1 or a 0.
 //                a-values for line 1, b-values for line 2 and etc ...
 //        ?   --  Indicate non-pixel value which will be discarded.
 
 // If mask_mode is on, 
 // then the expected bitMask parameter would have the
 // following format and layout
 int    i_maskLen = 2;                  // (mBandWidth * numLines + 7) / 8
 byte[] bitMask   = new byte[i_maskLen];

 // Now set bitMask := [AAABBBCC][C???????]
 //
 // where [ ]  --  Indicate a byte. Each char within represent one bit value
 //       ABC  --  Indicate bit value. In this case a 1 or a 0.
 //                A-values for line 1, B-values for line 2 and etc ...
 //        ?   --  Indicate non-bitvalue which will be discarded.
 
 setScanLines (numLines, scanLines, bitMask);

 

Specified by:
setScanLines in interface SeRasterConsumer
Parameters:
numLines - an int value.
scanLines - a byte[] value.
bitMask - a byte[] value.
See Also:
setScanLines(int, byte[], byte[])

rasterComplete

public void rasterComplete(int status)
The rasterComplete method is part of the SeRasterConsumer API which this class must implement to retrieve the raster data.

Note: This method is intended to be called by the SeRasterProducer of the Image whose scanline are being grabbed.

The valid status values are:

Specified by:
rasterComplete in interface SeRasterConsumer
Parameters:
status - an int value.
See Also:
SeRasterConsumer