ComplexPlaneToArray Method

NI Vision for Visual Basic

ComplexPlaneToArray Method

Syntax

CWIMAQVision.ComplexPlaneToArray SourceImage, Array, Plane [, Rectangle]

Return Type

Long

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

Purpose

Extracts a plane from a complex image into a 2D array.

Remarks

SourceImage must be a Complex image.

Parameters

SourceImage As CWIMAQImage

The image whose plane of pixel values the method places into an array.

Array As Variant

On return, the array of values.

Plane As CWIMAQComplexPlanes

The plane to extract.

Rectangle As Variant

[Optional] The rectangular region of the image to return. If you do not supply this parameter, the method uses the entire image.

Example

Dim a
Dim b
Dim rectangle As New CWIMAQRectangle

' Extract the real plane from the image in Viewer1 and
' store it in an array named a
CWIMAQVision1.ComplexPlaneToArray CWIMAQViewer1.Image, a, _
                                  cwimaqComplexPlaneReal

' Extract the magnitude plane of a rectangular portion of the
' image in Viewer1 and store in an array named b
rectangle.Initialize 50, 50, 100, 100
CWIMAQVision1.ComplexPlaneToArray CWIMAQViewer1.Image, b, _
                                  cwimaqComplexPlaneMagnitude, _
                                  rectangle