QVideo 4.7.0__tar.gz → 4.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qvideo-4.7.0 → qvideo-4.7.1}/PKG-INFO +1 -1
- {qvideo-4.7.0 → qvideo-4.7.1}/QVideo.egg-info/PKG-INFO +1 -1
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Genicam/_camera.py +15 -1
- {qvideo-4.7.0 → qvideo-4.7.1}/pyproject.toml +1 -1
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qgenicamcamera.py +53 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/LICENSE.md +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/QCamcorder.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/QVideo.egg-info/SOURCES.txt +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/QVideo.egg-info/dependency_links.txt +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/QVideo.egg-info/requires.txt +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/QVideo.egg-info/top_level.txt +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/README.md +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/__main__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Basler/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Basler/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Basler/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Flir/QListFlirCameras.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Flir/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Flir/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Flir/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Genicam/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Genicam/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/IDS/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/IDS/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/IDS/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/MV/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/MV/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/MV/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Noise/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Noise/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Noise/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/OpenCV/QListCVCameras.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/OpenCV/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/OpenCV/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/OpenCV/_devices.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/OpenCV/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Picamera/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Picamera/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Picamera/_imx500.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Picamera/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Vimbax/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Vimbax/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/Vimbax/_tree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/cameras/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/ROIdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/circulardemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/combineddemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/compositedemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/demo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/filterdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/filterrackdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/histogramdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/trackpydemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/uniformitydemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/demos/yolodemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QCircularBuffer.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QCircularDVRWidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QDVRWidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QHDF5Reader.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QHDF5Writer.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QOpenCVReader.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/QOpenCVWriter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/dvr/icons_rc.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/_MedianBase.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/artistic.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/blob.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/circletransform.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/darkframe.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/dejitter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/dog.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/edge.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/exposure.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/flatfield.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/foreground.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/gamma.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/invert.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/laplacian.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/median.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/momean.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/momedian.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/normalize.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/rgb.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/roi.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/samplehold.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/smoothing.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/sobel.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/threshold.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/filters/unsharp.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QCamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QCameraTree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QFilterPipeline.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QFilterRack.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QFilterRackWidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QFrameRelay.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QHistogramWidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QListCameras.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QSnapshot.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QUniformityWidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QVideoFilter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QVideoReader.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QVideoScreen.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QVideoSource.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/QVideoWriter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/_jupyter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/_launch.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/_qabc.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/chooser.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/clickable.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/errors.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/gentl.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/imageops.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/lib/videotypes.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/overlays/__init__.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/overlays/trackpy.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/overlays/yolo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/setup.cfg +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_artistic.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_blob.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_camera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_chooser.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_circletransform.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_circularbuffer.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_circulardemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_circulardvrwidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_clickable.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_combineddemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_compositedemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_darkframe.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_dejitter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_demo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_demo_recipes.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_docs_quickstart.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_dog.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_edge.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_exposure.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_filter_export.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_filterdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_filterrackdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_filters_gray.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_flatfield.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_foreground.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_gamma.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_gentl.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_histogramdemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_histogramwidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_icons_rc.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_imageops.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_invert.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_jupyter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_laplacian.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_launch.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_mainwindow.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_median.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_momean.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_momedian.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_normalize.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_overlays_package.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qabc.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qbaslercamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qcamcorder.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qcamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qcameratree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qdvrwidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qfilterpipeline.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qfilterrack.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qfilterrackwidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qflircamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qframerelay.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qgenicamtree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qhdf5reader.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qhdf5writer.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qidscamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qimxcamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qlistcameras.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qlistcvcameras.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qlistflircameras.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qmvcamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qnoisecamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qnoisetree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qopencvcamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qopencvdevices.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qopencvreader.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qopencvtree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qopencvwriter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qpicamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qpicameratree.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qsnapshot.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qt_binding.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qvideoreader.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qvideoscreen.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qvideosource.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qvideowriter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_qvimbaxcamera.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_resolutions.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_rgb.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_roi.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_roidemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_samplehold.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_smoothing.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_sobel.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_threshold.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_trackpy_overlay.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_trackpydemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_uniformitydemo.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_uniformitywidget.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_unsharp.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_vendor_trees.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_videofilter.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_videotypes.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_yolo_overlay.py +0 -0
- {qvideo-4.7.0 → qvideo-4.7.1}/tests/test_yolodemo.py +0 -0
|
@@ -118,7 +118,7 @@ class QGenicamCamera(QCamera):
|
|
|
118
118
|
'Check that the camera is connected and powered, and that '
|
|
119
119
|
'you have permission to access it.') from ex
|
|
120
120
|
self._nodeMap = self._device.remote_device.node_map
|
|
121
|
-
if not self._nodeMap
|
|
121
|
+
if not self._isConnected(self._nodeMap):
|
|
122
122
|
logger.warning('harvesters node map unconnected; '
|
|
123
123
|
'loading manually from device port')
|
|
124
124
|
self._nodeMap = self._load_node_map(self._device)
|
|
@@ -295,6 +295,20 @@ class QGenicamCamera(QCamera):
|
|
|
295
295
|
'''
|
|
296
296
|
return gentl.findProducer(*filenames)
|
|
297
297
|
|
|
298
|
+
@staticmethod
|
|
299
|
+
def _isConnected(nodeMap: 'NodeMap') -> bool:
|
|
300
|
+
'''Return whether harvesters connected *nodeMap* to the camera.
|
|
301
|
+
|
|
302
|
+
A node map that is not connected has no ``Root``. Older versions of
|
|
303
|
+
``genicam`` answer ``False`` for it, and version 1.6 raises
|
|
304
|
+
``AccessException`` ("reference not valid") instead; both mean that
|
|
305
|
+
the map must be loaded by hand.
|
|
306
|
+
'''
|
|
307
|
+
try:
|
|
308
|
+
return nodeMap.has_node('Root')
|
|
309
|
+
except Exception:
|
|
310
|
+
return False
|
|
311
|
+
|
|
298
312
|
@staticmethod
|
|
299
313
|
def _load_node_map(device: 'ImageAcquirer') -> 'NodeMap | None':
|
|
300
314
|
'''Reload the node map by re-running harvesters' own loading logic.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "QVideo"
|
|
7
|
-
version = "4.7.
|
|
7
|
+
version = "4.7.1"
|
|
8
8
|
description = "PyQt-based framework for integrating video cameras into research applications"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "GPL-3.0-or-later" }
|
|
@@ -477,6 +477,59 @@ class TestNode(unittest.TestCase):
|
|
|
477
477
|
nm.has_node.assert_called_with('Root')
|
|
478
478
|
|
|
479
479
|
|
|
480
|
+
# ---------------------------------------------------------------------------
|
|
481
|
+
# TestUnconnectedNodeMap
|
|
482
|
+
# ---------------------------------------------------------------------------
|
|
483
|
+
|
|
484
|
+
class TestUnconnectedNodeMap(unittest.TestCase):
|
|
485
|
+
'''harvesters can hand over a node map that is not connected.
|
|
486
|
+
|
|
487
|
+
Older versions of genicam answer ``has_node('Root')`` with ``False`` for
|
|
488
|
+
such a map; version 1.6 raises an ``AccessException``. Both must lead
|
|
489
|
+
to loading the map by hand.
|
|
490
|
+
'''
|
|
491
|
+
|
|
492
|
+
def open_with(self, **has_node):
|
|
493
|
+
node_map = _make_node_map()
|
|
494
|
+
node_map.has_node.configure_mock(**has_node)
|
|
495
|
+
connected = _make_node_map()
|
|
496
|
+
with patch.object(_ConcreteCamera, '_load_node_map',
|
|
497
|
+
return_value=connected) as load:
|
|
498
|
+
with self.assertLogs('QVideo.cameras.Genicam._camera',
|
|
499
|
+
level='WARNING'):
|
|
500
|
+
cam, _, _ = make_camera(device=_make_device(node_map))
|
|
501
|
+
return cam, load, connected
|
|
502
|
+
|
|
503
|
+
def test_an_answer_of_false_loads_the_map_by_hand(self):
|
|
504
|
+
cam, load, connected = self.open_with(return_value=False)
|
|
505
|
+
load.assert_called_once()
|
|
506
|
+
self.assertIs(cam._nodeMap, connected)
|
|
507
|
+
self.assertTrue(cam.isOpen())
|
|
508
|
+
|
|
509
|
+
def test_an_access_exception_loads_the_map_by_hand(self):
|
|
510
|
+
cam, load, connected = self.open_with(
|
|
511
|
+
side_effect=RuntimeError('Feature not present'))
|
|
512
|
+
load.assert_called_once()
|
|
513
|
+
self.assertIs(cam._nodeMap, connected)
|
|
514
|
+
self.assertTrue(cam.isOpen())
|
|
515
|
+
|
|
516
|
+
def test_a_connected_map_is_used_as_it_is(self):
|
|
517
|
+
with patch.object(_ConcreteCamera, '_load_node_map') as load:
|
|
518
|
+
cam, _, device = make_camera()
|
|
519
|
+
load.assert_not_called()
|
|
520
|
+
self.assertIs(cam._nodeMap, device.remote_device.node_map)
|
|
521
|
+
|
|
522
|
+
def test_a_map_that_cannot_be_loaded_is_reported(self):
|
|
523
|
+
node_map = _make_node_map()
|
|
524
|
+
node_map.has_node.side_effect = RuntimeError('Feature not present')
|
|
525
|
+
with patch.object(_ConcreteCamera, '_load_node_map',
|
|
526
|
+
return_value=None):
|
|
527
|
+
with self.assertLogs('QVideo.cameras.Genicam._camera',
|
|
528
|
+
level='WARNING'):
|
|
529
|
+
with self.assertRaises(QDeviceError):
|
|
530
|
+
make_camera(device=_make_device(node_map))
|
|
531
|
+
|
|
532
|
+
|
|
480
533
|
# ---------------------------------------------------------------------------
|
|
481
534
|
# TestHasNode
|
|
482
535
|
# ---------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|