SetRowColumn Method

NI Vision for Visual Basic

SetRowColumn Method

Syntax

CWIMAQVision.SetRowColumn DestImage, Index, Array, RowOrColumn

Return Type

Long

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

Purpose

Changes the intensity values in either a row or a column of pixels in an image.

Remarks

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

Parameters

DestImage As CWIMAQImage

The image whose pixel values the method modifies.

Index As Long

The row or column number to modify.

Array As Variant

The 1D array of replacement pixel values.

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

GetRowColumn

SetLine2