Interface IRawPixels

Namespace
ESRI.ArcGIS.DatasourcesRaster
Assembly
ESRI.Server.DatasourcesRaster.dll

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

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("5A2D94AE-190A-479C-93B9-D6645BB121E6")]
public interface IRawPixels

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.

Properties

NumCacheRefs

Number of outstanding cache references

int NumCacheRefs { get; }

Property Value

int

Methods

AcquireCache()

Gets reference to edit cache.

object AcquireCache()

Returns

object

CreatePixelBlock(IPnt)

Allocates a PixelBlock of size requested and type of this band.

IPixelBlock CreatePixelBlock(IPnt Size)

Parameters

Size IPnt

Returns

IPixelBlock

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.

Read(IPnt, IPixelBlock)

Read a block of pixels starting from tlc (top left corner).

void Read(IPnt tlc, IPixelBlock pxls)

Parameters

tlc IPnt
pxls IPixelBlock

ReturnCache(object)

Restores edit cache to previous state.

int ReturnCache(object cache)

Parameters

cache object

Returns

int

Write(IPnt, IPixelBlock)

Write a block of pixels starting from tlc (top left corner).

void Write(IPnt tlc, IPixelBlock pxls)

Parameters

tlc IPnt
pxls IPixelBlock