ExtractComplexPlane Method
Syntax
CWIMAQVision.ExtractComplexPlane SourceImage, DestImage, Plane
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Extracts a plane from a complex image and places the plane into another image.
Remarks
Use this method with Complex images. The destination image must be a U8, I16, or SGL image.
Parameters
SourceImage As CWIMAQImage
The source image.
DestImage As CWIMAQImage
The resulting image containing the extracted plane.
Plane As CWIMAQComplexPlanes
The plane to extract. Set this parameter to cwimaqComplexPlaneReal to extract the real plane or cwimaqComplexPlaneImaginary to extract the complex plane.
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