Image
The image is the base layer of the display. All vision elements are positioned relative to the image coordinate system, so an image must be set before any elements can be added.
setImage()
Sets the base image of the display.
setImage(image: Ve.Image): Promise<void>;
This is an async operation. The image is converted to an internal tile-based format before being sent to the client. The display will update once the conversion is complete.
Automatic normalization adjustment: If the new image has a different pixel format than the previous one, and the current normalize mode is not Manual, the normalization range is automatically recalculated to match the range of the new pixel format. This means you don't need to manually reset the config when switching between, for example, an 8-bit and a 16-bit image.
The image is always rendered at pixel coordinates (0, 0). Any custom frame set on the Ve.Image is ignored — the display coordinate system is always top-left origin, imageWidth × imageHeight.
// INIT script
global var ctrl = Visu.page0.display1.getController();
// CYCLIC script
var image = Cameras.camera1.getImage();
await ctrl.setImage(image);
setImage() does not clear existing elements. If you want to replace both the image and the elements atomically, use sendCapture() instead.
getImage()
Returns the current base image, or undefined if no image has been set yet.
getImage(): Ve.Image | undefined;
Useful to read back the image for further processing, or to check whether the display has been initialized before attempting to add elements.