Unregistered
June 9, 2005, 20:54:24
After much trial and error, I have discovered that images stored in the ring buffer cannot be displayed one after the other by looping through the ring within an event handler. For example, the following does not work:
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim Frame As TIS.imaging.ImageBuffer
Dim i, nBuffers As Integer
nBuffers = IcImagingControl1.ImageBuffers.GetUpperBound(0)
For i = 0 To nBuffers
Frame = IcImagingControl1.ImageBuffers(i)
IcImagingControl1.DisplayImageBuffer(Frame)
Thread.Sleep(1000)
Next
End Sub
One can verify that an event handler (such as the one above) can display at most one image, and that the image is not displayed until after the handler exits.
Could you please explain this behaviour, and suggest an efficient way of displaying a succession of images (for example, to simulate time-lapse video). (I've thought of defining and raising an event, but haven't tried it yet.)
Thanks,
Bill
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim Frame As TIS.imaging.ImageBuffer
Dim i, nBuffers As Integer
nBuffers = IcImagingControl1.ImageBuffers.GetUpperBound(0)
For i = 0 To nBuffers
Frame = IcImagingControl1.ImageBuffers(i)
IcImagingControl1.DisplayImageBuffer(Frame)
Thread.Sleep(1000)
Next
End Sub
One can verify that an event handler (such as the one above) can display at most one image, and that the image is not displayed until after the handler exits.
Could you please explain this behaviour, and suggest an efficient way of displaying a succession of images (for example, to simulate time-lapse video). (I've thought of defining and raising an event, but haven't tried it yet.)
Thanks,
Bill