CogDisplay Image Property Cognex VisionPro 9.8
Gets or sets the image currently in the display.

Namespace: Cognex.VisionPro.Display
Assembly: Cognex.VisionPro.Display.Controls (in Cognex.VisionPro.Display.Controls.dll) Version: 75.1.0.0 (75.1.0.0)
Syntax

public virtual ICogImage Image { get; set; }

Property Value

Type: ICogImage
The image in the display.
Events

Exceptions

Remarks

When displaying images of different types and a colormap is set, you may have to call one of the colormap properties with a new value in order to update the internal colormap.
Remarks

To display an image, set this property to the image to display.

Setting this property to   causes the display to release its current image reference and to fill the display window with the background color.

Examples

private void AcquireButton_Click(object sender, System.EventArgs e)
{
    int trignum;

    cogDisplay1.Image = mAcqFifo.Acquire(out trignum);
    cogDisplay1.Fit(true);

    numAcqs++;
    if (numAcqs > 4) {
        GC.Collect();
        numAcqs = 0;
    }
}
Private Sub AcquireButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcquireButton.Click
    Dim trignum As Integer

    cogDisplay1.Image = mAcqFifo.Acquire(trignum)
    cogDisplay1.Fit(True)
    numAcqs += 1

    If numAcqs > 4 Then
        GC.Collect()
        numAcqs = 0
    End If
End Sub
See Also