GetRowColumn Method

NI Vision for Visual Basic

GetRowColumn Method

Syntax

CWIMAQVision.GetRowColumn SourceImage, Index, Array, RowOrColumn

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Reads a row or a column of pixel values from an image into an array.

Remarks

Use this method with U8, U16, I16, SGL, RGB32, and HSL32 images.

Parameters

SourceImage As CWIMAQImage

The input image.

Index As Long

The row or column number to extract.

Array As Variant

On return, the array of pixel values extracted from the image.

RowOrColumn As CWIMAQRowColumn

Specifies a row or column operation.

Example

Private Sub Run_Click()
    Dim pixelArray

    ' Get the tenth column of pixels from the image on Viewer1
    CWIMAQVision1.GetRowColumn CWIMAQViewer1.Image, 10, pixelArray, _
                               cwimaqColumn
                               
    ' Set the 20th row of pixels on the image in Viewer1
    ' with the resulting data.
    CWIMAQVision1.SetRowColumn CWIMAQViewer1.Image, 20, pixelArray, _
                               cwimaqRow
End Sub

See Also

SetRowColumn

GetLine2