CxAdd Method

NI Vision for Visual Basic

CxAdd Method

Syntax

CWIMAQVision.CxAdd SourceImage, DestImage, ImageOrReal [, Imaginary]

Return Type

Long

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

Purpose

Adds an image or a constant to a complex image.

Remarks

SourceImage and DestImage must be Complex images.

If ImageOrReal is an image, it must be a U8, I16, SGL, or Complex image.

Parameters

SourceImage As CWIMAQImage

The first input image.

DestImage As CWIMAQImage

The resulting image.

ImageOrReal As Variant

Either the second input image or the real part of the constant.

Imaginary As Variant

[Optional] The imaginary part of the constant.

Example

' Add a constant 10-20i to the image in Viewer1
Dim i As New CWIMAQImage
i.Type = cwimaqImageTypeComplex

CWIMAQVision1.CxAdd CWIMAQViewer1.Image, i, 10, -20

' Add the image in Viewer1 to i
CWIMAQVision1.CxAdd CWIMAQViewer1.Image, i, i