CVBpy 14.0
ImageController Class Reference

Controller object for the QML image view item. More...

Inherits QObject.

Public Member Functions

None refresh (cvb.Image image=None, int auto_refresh=cvb.ui.AutoRefresh.Off)
 Share the image and refresh the view. More...
 
None release_refresh_share (self)
 Releases the shared image. More...
 

Properties

 height = property
 Height of the shared image in pixels. More...
 
 image = property
 Get the currently shared image.
 
 planeCount = property
 Get the number of planes for this image. More...
 
 width = property
 Width of the shared image in pixels. More...
 

Detailed Description

Controller object for the QML image view item.

An instance of this class should be set as context property for QML context. In QML an instance of ImageViewItem can connect to this instance by binding it to its image property.

Creates an empty controller.

Member Function Documentation

◆ refresh()

None refresh ( cvb.Image   image = None,
int   auto_refresh = cvb.ui.AutoRefresh.Off 
)

Share the image and refresh the view.

Parameters

image : cvb.Image The image, which will be shared with the display.

auto_refresh : int Switch to control automatic refreshing (see cvb.ui.AutoRefresh).

◆ release_refresh_share()

None release_refresh_share (   self)

Releases the shared image.

Use this method if you must release the shared image manually. Setting a new shared image and destroying this image view will automatically release the shared image.

Property Documentation

◆ height

height = property
static

Height of the shared image in pixels.

If no image is shared, return 0.

This is a QML property!

◆ planeCount

planeCount = property
static

Get the number of planes for this image.

If no image is shared, return 0.

This is a QML property!

◆ width

width = property
static

Width of the shared image in pixels.

If no image is shared, return 0.

This is a QML property!