CImageView:Update


The Update method forces the CImageView window to update its display after its images are changed.

Syntax

CImageView:Update()

CImageView:Update( nIndex )

where

    nIndex specifies the index of the image to update, in the range 1 to Count. If no argument is specified, the current image is updated.

  

The image display window shows a view of the image data, but not the image data itself. After changing the image data, the view does not display changed until an update is performed. This command performs the update for a specific image. If the optional nIndex parameter is not passed, then only the current image is updated. If the window has an image set of more than 1 images, then the UpdateAll command can be used to update all images.

Example

Assume that a CImageView exists and is referenced by V. The following script updates the view window a window update after changing a pixel value on the currently displayed image:

I = V:GetImage()

-- fetch the current displayed image

I:Set( {200,400}, 10000 )

-- change the value at pixel (200,400)

V:Update()

-- force a window update to show the change

I:delete()

-- clean up when done

Related Topics

UpdateAll

CImageView class

CImage class