IPixelBlockCursor Interface

Provides access to members that control pixel block cursor.

Members

Name Description
Method GetBlockSize Gets the cursor block size.
Method InitByRaster Initializes the cursor by the raster interface.
Method InitByRawPixels Initializes the cursor by the raw pixel interface.
Method NextBlock Obtains the next pixel block from the cursor.
Write-only property ScanMode The cursor scan mode: Line = 0, LineSerpent = 1, Serpent2 = 3, alaGIF = 4.
Method UpdateBlockSize Updates the cursor block size.

IPixelBlockCursor.GetBlockSize Method

Gets the cursor block size.

Public Sub GetBlockSize ( _
    ByRef pBlockSizeX As Integer, _
    ByRef pBlockSizeY As Integer _
)
public void GetBlockSize (
    ref int pBlockSizeX,
    ref int pBlockSizeY
);

IPixelBlockCursor.InitByRaster Method

Initializes the cursor by the raster interface.

Public Sub InitByRaster ( _
    ByVal pRaster As IRaster _
)
public void InitByRaster (
    IRaster pRaster
);

IPixelBlockCursor.InitByRawPixels Method

Initializes the cursor by the raw pixel interface.

Public Sub InitByRawPixels ( _
    ByVal pRowPixels As IRawPixels, _
    ByVal BlockSizeX As Integer, _
    ByVal BlockSizeY As Integer _
)
public void InitByRawPixels (
    IRawPixels pRowPixels,
    int BlockSizeX,
    int BlockSizeY
);

IPixelBlockCursor.NextBlock Method

Obtains the next pixel block from the cursor.

Public Function NextBlock ( _
    ByRef pLeft As Integer, _
    ByRef pTop As Integer, _
    ByRef pSizeX As Integer, _
    ByRef pSizeY As Integer _
) As IPixelBlock
public IPixelBlock NextBlock (
    ref int pLeft,
    ref int pTop,
    ref int pSizeX,
    ref int pSizeY
);

IPixelBlockCursor.ScanMode Property

The cursor scan mode: Line = 0, LineSerpent = 1, Serpent2 = 3, alaGIF = 4.

Public WriteOnly Property ScanMode
public void ScanMode {set;}

Remarks

The supported 4 scan modes are Line, LineSerpent, Serpent, and alaGIF, with value 0,1,3, and 4 respectively. The default is line mode.

If you wish to change the scan mode, this property must be set immedietly after initializing the pixel block (calling InitByRawPixels or InitByRaster).

IPixelBlockCursor.UpdateBlockSize Method

Updates the cursor block size.

Public Sub UpdateBlockSize ( _
    ByVal BlockSizeX As Integer, _
    ByVal BlockSizeY As Integer _
)
public void UpdateBlockSize (
    int BlockSizeX,
    int BlockSizeY
);

Remarks

This should be used only when reading a PixelBlock from a Raster.

Classes that implement IPixelBlockCursor

Classes Description
PixelBlockCursor A PixelBlock cursor class.

Remarks

This is a legacy interface since ArcGIS 9.2. Please use IRaster2.CreateCursorEx and IRasterCursor.

The IPixelBlockCursor interface controls iteration through the pixel blocks of a Raster and a RasterBand.

The InitByRawPixels method initializes a PixelBlock from a RasterBand by specifying the pixel block size.

The InitByRaster method initializes the PixelBlock from a Raster. The size of the PixelBlock is determined automatically when creating from a Raster.

GetBlockSize returns the size of the current pixel block.

NextBlock retrieves the next pixel block, the location of upper-left corner of the pixel block in pixel space, and size of the pixel block.

The ScanMode, a write-only property, specifies the pixel block scan mode. The default is line mode. If you wish to change the scan mode, this property must be set immediately after initializing pixel block (calling InitByRawPixels or InitByRaster). The supported 4 scan modes are Line, LineSerpent, Serpent, and alaGIF, with values 0, 1, 3, and 4 respectively.

The UpdateBlockSize method changes the pixel block size for retrieving the next pixel block. This should be used only when reading pixel block from a Raster.

When iterating through the pixel blocks in a RasterBand, you must specify the size of the pixel block at the time of initiating it. After initiation, the size of the pixel block is fixed. When iterating through the pixel blocks in a Raster, the size of the pixel block is determined automatically at the time of initiation. You can modify it later on.

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