ReplaceComplexPlane Method
Syntax
CWIMAQVision.ReplaceComplexPlane SourceImage, DestImage, Plane
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Replaces a plane of a complex image with the pixel values from a given image.
Remarks
SourceImage must be a U8, I16, SGL, or Complex image. DestImage must be a Complex image.
Parameters
SourceImage As CWIMAQImage
The image containing the replacement values. This image can be a U8, I16, or SGL image.
DestImage As CWIMAQImage
The image whose data the method modifies.
Plane As CWIMAQComplexPlanes
The complex image plane to replace. Set this value to cwimaqComplexPlaneReal or cwimaqComplexPlaneImaginary. If SourceImage is a Complex image, then this parameter also selects which plane of the source image is used as the replacement.
Example
' This example assumes that the image in Viewer1 is a Complex image ' and the image in Viewer2 is a Complex image. Private Sub Run_Click() Dim r As New CWIMAQImage Dim i As New CWIMAQImage 'Set the plane types to SGL r.Type = cwimaqImageTypeSGL i.Type = cwimaqImageTypeSGL ' Extract the real plane on the image in Viewer1 into r. CWIMAQVision1.ExtractComplexPlane CWIMAQViewer1.Image, r, _ cwimaqComplexPlaneReal ' Extract the imaginary plane on the image in Viewer1 into i. CWIMAQVision1.ExtractComplexPlane CWIMAQViewer1.Image, i, _ cwimaqComplexPlaneImaginary ' Replace the real plane of Viewer2 with the data in r. CWIMAQVision1.ReplaceComplexPlane r, CWIMAQViewer2.Image, _ cwimaqComplexPlaneReal ' Replace the imaginary plane of Viewer2 with the data in i. CWIMAQVision1.ReplaceComplexPlane i, CWIMAQViewer2.Image, _ cwimaqComplexPlaneImaginary End Sub