IPixelBlock3 Interface

Provides access to members that control a PixelBlock.

Description

The IPixelBlock3 interface provides all the functionality of IPixelBlock interface, plus more properties on mask based NoData and SafeArray handling.

Basically, there are two ways to work with NoData mask and pixel values. They are by value (PixelData and NoDataMask properties) and by reference (PixelDataByRef and NoDataMaskByRef). Normally passing pixel values by reference is recommented since it saves memory. However for Java and .Net, passing by value (PixelData) should be used.

Members

Name Description
Read-only property BytesPerPixel The number of bytes per pixel for the PixelBlock.
Method Clear Clears a given plane (sets to NoData).
Method GetNoDataMaskVal Gets the NoData mask value for a specified pixel.
Method GetVal The value for a specified pixel.
Method HasNoData Checks if this PixelBlock contains NoData.
Read-only property Height The height of the PixelBlock in pixels.
Method Mask Generates NoData Mask using a given NoData value.
Read/write property NoDataMask The NoData mask for a specified plane.
Read-only property NoDataMaskByRef The NoData mask for a specified plane.
Read/write property PixelData An array of pixels for a specified plane.
Read-only property PixelDataByRef A pointer to an array of pixels for a specified plane.
Read/write property PixelType The pixel type of the PixelBlock.
Read-only property Planes The number of pixel arrays contained in the PixelBlock.
Read-only property Width The width of the PixelBlock in pixels.

IPixelBlock3.BytesPerPixel Property

The number of bytes per pixel for the PixelBlock.

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

IPixelBlock3.Clear Method

Clears a given plane (sets to NoData).

Public Sub Clear ( _
    ByVal plane As Integer _
)
public void Clear (
    int plane
);

IPixelBlock3.GetNoDataMaskVal Method

Gets the NoData mask value for a specified pixel.

Public Function GetNoDataMaskVal ( _
    ByVal plane As Integer, _
    ByVal x As Integer, _
    ByVal y As Integer _
) As Object
public object GetNoDataMaskVal (
    int plane,
    int x,
    int y
);

Description

The GetNoDataMaskVal property allows you to identify whether a specific pixel is NoData or not. Value 1 means this corresponding pixel has a value and 0 means this corresponding pixel is NoData

IPixelBlock3.GetVal Method

The value for a specified pixel.

Public Function GetVal ( _
    ByVal plane As Integer, _
    ByVal x As Integer, _
    ByVal y As Integer _
) As Object
public object GetVal (
    int plane,
    int x,
    int y
);

Description

The GetVal method returns an individual value for the pixel specified by the band and pixel location input.

IPixelBlock3.HasNoData Method

Checks if this PixelBlock contains NoData.

Public Function HasNoData ( _
    ByVal plane As Integer _
) As Boolean
public bool HasNoData (
    int plane
);

Description

The HasNoData property indicates whether the PixelBlock has NoData or not. True means it has NoData.

IPixelBlock3.Height Property

The height of the PixelBlock in pixels.

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

IPixelBlock3.Mask Method

Generates NoData Mask using a given NoData value.

Public Sub Mask ( _
    ByVal NoData As Object _
)
public void Mask (
    object NoData
);

IPixelBlock3.NoDataMask Property

The NoData mask for a specified plane.

Public Function get_NoDataMask ( _
    ByVal plane As Integer _
) As Object
Public Sub set_NoDataMask ( _
    ByVal plane As Integer, _
    ByVal pVal As Object _
)
public object get_NoDataMask (
    int plane
);
public void set_NoDataMask (
    int plane,
    object pVal
);

Description

Conceptually, a NoData mask is a two-dimensional array with values 0 and 1. Each element in the two-dimensional array is correspondent to a pixel in a raster; 1 indicates the pixel is a value pixel and 0 means the pixel is NoData.

In order to save space, the NoData mask is actually stored as a one-dimensional array of byte. Each byte is used to represent NoData value flags for 8 correspondent pixels.

If the image (or SafeArray) has an dimension of nxn, the length of the array returned from NoDataMask will be (n*n+7)/7

IPixelBlock3.NoDataMaskByRef Property

The NoData mask for a specified plane.

Public Function get_NoDataMaskByRef ( _
    ByVal plane As Integer _
) As Object
public object get_NoDataMaskByRef (
    int plane
);

Remarks

The NoDataMaskByRef property returns a one-dimensional array of NoData mask by reference.

IPixelBlock3.PixelData Property

An array of pixels for a specified plane.

Public Function get_PixelData ( _
    ByVal plane As Integer _
) As Object
Public Sub set_PixelData ( _
    ByVal plane As Integer, _
    ByVal pVal As Object _
)
public object get_PixelData (
    int plane
);
public void set_PixelData (
    int plane,
    object pVal
);

Remarks

The PixelData property specifies the pixel values of the specified raster band.

IPixelBlock3.PixelDataByRef Property

A pointer to an array of pixels for a specified plane.

Public Function get_PixelDataByRef ( _
    ByVal plane As Integer _
) As Object
public object get_PixelDataByRef (
    int plane
);

Description

The PixelDataByRef property returns an array of pixel values of a specified raster band by reference.

IPixelBlock3.PixelType Property

The pixel type of the PixelBlock.

Public Function get_PixelType ( _
    ByVal plane As Integer _
) As rstPixelType
Public Sub set_PixelType ( _
    ByVal plane As Integer, _
    ByVal pVal As rstPixelType _
)
public rstPixelType get_PixelType (
    int plane
);
public void set_PixelType (
    int plane,
    rstPixelType pVal
);

IPixelBlock3.Planes Property

The number of pixel arrays contained in the PixelBlock.

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

Remarks

The Planes property returns the number of bands in the PixelBlock.

IPixelBlock3.Width Property

The width of the PixelBlock in pixels.

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

Classes that implement IPixelBlock3

Classes Description
PixelBlock Esri PixelBlock, a container of pixel data.

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