This document is archived and information here might be outdated. Recommended version. |
Provides access to members that control pixel reading and writing from a RasterBand.
Name | Description | |
---|---|---|
AcquireCache | Gets reference to edit cache. | |
CreatePixelBlock | Allocates a PixelBlock of size requested and type of this band. | |
NumCacheRefs | Number of outstanding cache references | |
Read | Read a block of pixels starting from tlc (top left corner). | |
ReturnCache | Restores edit cache to previous state. | |
Write | Write a block of pixels starting from tlc (top left corner). |
CoClasses and Classes | Description |
---|---|
RasterBand | A representation of a single band of a raster dataset on disk. |
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.