com.esri.arcgis.datasourcesraster
Interface IRawPixels

All Superinterfaces:
Serializable
All Known Implementing Classes:
IRawPixelsProxy, RasterBand

public interface IRawPixels
extends Serializable

Provides access to members that control pixel reading and writing from a RasterBand.

Remarks

When using a PixelBlock created by the RasterBand coclass, use only the first plane because the RasterBand is a single band. All formats can be read using this technique, but only GRID, TIFF, Imagine, BIL, BIP, and BSQ formats can be written. Reading the PixelBlock from the band completes the initialization of the PixelBlock and should be done before writing to the band.

The Read method reads a block of pixels into the input PixelBlock object. The data is read beginning at a specified pixel location. This pixel location is the offset from the top-left corner of the image, represented by (0,0), and increases down and to the right.

The Write method outputs the contents of a PixelBlock to the RasterBand. The PixelBlock is written to an area in the band specified by its top-left corner in the same pixel coordinate space used by the Read method. If transactioning is enabled, this write is persisted temporarily to a memory cache that allows undo support; otherwise, the data is persisted directly to disk at this time.

The AcquireCache and ReturnCache methods control a cache within the band object that allows the transactioning mechanism used by the RasterBand to be activated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 Object acquireCache()
          Gets reference to edit cache.
 IPixelBlock createPixelBlock(IPnt size)
          Allocates a PixelBlock of size requested and type of this band.
 int getNumCacheRefs()
          Number of outstanding cache references
 void read(IPnt tlc, IPixelBlock pxls)
          Read a block of pixels starting from tlc (top left corner).
 int returnCache(Object cache)
          Restores edit cache to previous state.
 void write(IPnt tlc, IPixelBlock pxls)
          Write a block of pixels starting from tlc (top left corner).
 

Method Detail

createPixelBlock

IPixelBlock createPixelBlock(IPnt size)
                             throws IOException,
                                    AutomationException
Allocates a PixelBlock of size requested and type of this band.

Remarks

CreatePixelBlock method only initializes the properties of a pixel block, such as dimension, pixel type etc. Read method of this interface should be used to read pixels into the pixel block.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
size - A reference to a com.esri.arcgis.geodatabase.IPnt (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IPixelBlock
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

read

void read(IPnt tlc,
          IPixelBlock pxls)
          throws IOException,
                 AutomationException
Read a block of pixels starting from tlc (top left corner).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
tlc - A reference to a com.esri.arcgis.geodatabase.IPnt (in)
pxls - A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

write

void write(IPnt tlc,
           IPixelBlock pxls)
           throws IOException,
                  AutomationException
Write a block of pixels starting from tlc (top left corner).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
tlc - A reference to a com.esri.arcgis.geodatabase.IPnt (in)
pxls - A reference to a com.esri.arcgis.geodatabase.IPixelBlock (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

acquireCache

Object acquireCache()
                    throws IOException,
                           AutomationException
Gets reference to edit cache.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

returnCache

int returnCache(Object cache)
                throws IOException,
                       AutomationException
Restores edit cache to previous state.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
cache - A reference to another Object (IUnknown) (in)
Returns:
The num_refs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumCacheRefs

int getNumCacheRefs()
                    throws IOException,
                           AutomationException
Number of outstanding cache references

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The num_refs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.