com.esri.arcgis.datasourcesraster
Class IRawPixelsProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.datasourcesraster.IRawPixelsProxy
All Implemented Interfaces:
IRawPixels, Externalizable, Serializable

public class IRawPixelsProxy
extends com.esri.arcgis.interop.Dispatch
implements IRawPixels, 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.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E
 
Constructor Summary
  IRawPixelsProxy()
           
  IRawPixelsProxy(Object obj)
           
protected IRawPixelsProxy(Object obj, String iid)
           
 
Method Summary
 Object acquireCache()
          Gets reference to edit cache.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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).
 void readExternal(ObjectInput in)
           
 void removeListener(String iidStr, Object theListener)
           
 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).
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IRawPixelsProxy

public IRawPixelsProxy()

IRawPixelsProxy

public IRawPixelsProxy(Object obj)
                throws IOException
Throws:
IOException

IRawPixelsProxy

protected IRawPixelsProxy(Object obj,
                          String iid)
                   throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

createPixelBlock

public 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

Specified by:
createPixelBlock in interface IRawPixels
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

public 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

Specified by:
read in interface IRawPixels
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

public 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

Specified by:
write in interface IRawPixels
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

public 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

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

returnCache

public 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

Specified by:
returnCache in interface IRawPixels
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

public 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

Specified by:
getNumCacheRefs in interface IRawPixels
Returns:
The num_refs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException
ClassNotFoundException