6from PySide2.QtCore
import QObject, QUrl
7from PySide2.QtQml
import qmlRegisterType
8from PySide2.QtWidgets
import QApplication, QWidget
9from PySide2.QtQuick
import QQuickView, QQuickPaintedItem
10from PySide2.QtGui
import QIcon
14if __name__ ==
"__main__":
16 app = QApplication([])
17 app.setOrganizationName(
'STEMMER IMAGING')
18 app.setOrganizationDomain(
'https://www.stemmer-imaging.com/')
19 app.setApplicationName(
'Display Python tutorial')
22 if sys.platform ==
'win32':
24 myappid =
u'stemmerimaging.commonvisionblox.pystreamdisplay.0'
25 ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
27 app.setWindowIcon(QIcon(
'Tutorial-Python_32x32.png'))
32 cvb.AcquisitionStack.Vin)
45 view.setResizeMode(QQuickView.SizeRootObjectToView)
46 context = view.rootContext()
47 context.setContextProperty(
"mainImage", image_controller)
48 filepath = os.path.dirname(os.path.realpath(__file__))
49 view.setSource(QUrl.fromLocalFile(os.path.join(filepath,
"main.qml")))
55 image_controller.refresh(device.device_image, cvb.ui.AutoRefresh.On)
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] open(str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)
Opens a device with the given provider and acquisition stack.
Definition: __init__.py:1327
Handler object for a single stream.
Definition: __init__.py:4380
Controller object for the QML image view item.
Definition: __init__.py:14
None register(cls, str uri="CvbQuick", int version_major=1, int version_minor=0, str qml_name="ImageView")
Convenience method to register this type or a derived type in QML.
Definition: __init__.py:193
Common Vision Blox UI module for Python.
Definition: __init__.py:1
str install_path()
Directory Common Vision Blox has been installed to.
Definition: __init__.py:7146