ArrayToComplexPlane Method

NI Vision for Visual Basic

ArrayToComplexPlane Method

Syntax

CWIMAQVision.ArrayToComplexPlane SourceImage, DestImage, Array, Plane

Return Type

Long

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

Purpose

Replaces a plane of a complex image with the given array of pixel values.

Remarks

SourceImage and DestImage must be Complex images.

Parameters

SourceImage As CWIMAQImage

The source image.

DestImage As CWIMAQImage

The destination image.

Array As Variant

The 2D array of pixel values. This array must be the same size as the source image.

Plane As CWIMAQComplexPlanes

The plane to replace. Set this parameter to cwimaqComplexPlaneReal to replace the real plane or cwimaqComplexPlaneImaginary to replace the imaginary plane.

Example

Dim i As New CWIMAQImage
Dim RealArray
Dim ImaginaryArray

'Do something here to populate RealArray and ImaginaryArray so that 
'they are the same size as the image in Viewer1

'Replace the imaginary plane of the image in Viewer1 with the data 'stored in the array named ImaginaryArray.
'Store the results in image i.
CWIMAQVision1.ArrayToComplexPlane CWIMAQViewer1.Image, i, _                                   ImaginaryArray, _
                                  cwimaqComplexPlaneImaginary

'Replace the real plane of the image i with the data 
'stored in the array named RealArray.
'Do this operation inplace (store the result in i)
CWIMAQVision1.ArrayToComplexPlane i, i, RealArray, _
                                  cwimaqComplexPlaneImaginary