IRawPixels Interface

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

Members

Name Description
Method AcquireCache Gets reference to edit cache.
Method CreatePixelBlock Allocates a PixelBlock of size requested and type of this band.
Read-only property NumCacheRefs Number of outstanding cache references
Method Read Read a block of pixels starting from tlc (top left corner).
Method ReturnCache Restores edit cache to previous state.
Method Write Write a block of pixels starting from tlc (top left corner).

IRawPixels.AcquireCache Method

Gets reference to edit cache.

Public Function AcquireCache ( _
) As Object
public object AcquireCache (
);

IRawPixels.CreatePixelBlock Method

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

Public Function CreatePixelBlock ( _
    ByVal Size As IPnt _
) As IPixelBlock
public IPixelBlock CreatePixelBlock (
    IPnt Size
);

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.

IRawPixels.NumCacheRefs Property

Number of outstanding cache references.

Public ReadOnly Property NumCacheRefs As Integer
public int NumCacheRefs {get;}

IRawPixels.Read Method

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

Public Sub Read ( _
    ByVal tlc As IPnt, _
    ByVal pxls As IPixelBlock _
)
public void Read (
    IPnt tlc,
    IPixelBlock pxls
);

IRawPixels.ReturnCache Method

Restores edit cache to previous state.

Public Function ReturnCache ( _
    ByVal cache As Object _
) As Integer
public int ReturnCache (
    object cache
);

IRawPixels.Write Method

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

Public Sub Write ( _
    ByVal tlc As IPnt, _
    ByVal pxls As IPixelBlock _
)
public void Write (
    IPnt tlc,
    IPixelBlock pxls
);

Classes that implement IRawPixels

Classes Description
RasterBand A representation of a single band of a raster dataset on disk.

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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.