summaryrefslogtreecommitdiffstats
path: root/src/cameras/pylon_camera.cpp
diff options
context:
space:
mode:
authorVolker Kaiser <volker.kaiser@softwareschneiderei.de>2012-07-26 09:12:00 +0200
committerVolker Kaiser <volker.kaiser@softwareschneiderei.de>2012-07-26 15:36:43 +0200
commit67e3daeb2ad9d9835c4e19a1edd744cba92b83d1 (patch)
tree4a9c378753244c45d6d25054e3f23295195d1b1b /src/cameras/pylon_camera.cpp
parent9395f3ed8c69c7873c187d8a93b4755b685b3c96 (diff)
downloadlibuca-67e3daeb2ad9d9835c4e19a1edd744cba92b83d1.tar.gz
libuca-67e3daeb2ad9d9835c4e19a1edd744cba92b83d1.tar.bz2
libuca-67e3daeb2ad9d9835c4e19a1edd744cba92b83d1.tar.xz
libuca-67e3daeb2ad9d9835c4e19a1edd744cba92b83d1.zip
SCHNEIDE-255 (ROI support basler)
Diffstat (limited to 'src/cameras/pylon_camera.cpp')
-rw-r--r--src/cameras/pylon_camera.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/cameras/pylon_camera.cpp b/src/cameras/pylon_camera.cpp
index 71aede4..b73bc18 100644
--- a/src/cameras/pylon_camera.cpp
+++ b/src/cameras/pylon_camera.cpp
@@ -150,6 +150,41 @@ void pylon_camera_get_bit_depth(guint* depth, GError** error)
}
}
+void pylon_camera_get_roi(guint16* roi_x, guint16* roi_y, guint16* roi_width, guint16* roi_height, GError** error)
+{
+ g_assert(pGrabber);
+ g_assert(roi_x);
+ g_assert(roi_y);
+ g_assert(roi_width);
+ g_assert(roi_height);
+ try
+ {
+ GrabAPI::ROI roi = pGrabber->get_roi();
+ *roi_x = roi.x;
+ *roi_y = roi.y;
+ *roi_width = roi.width;
+ *roi_height = roi.height;
+ }
+ catch (const yat::Exception& e)
+ {
+ yat_exception_to_gerror(e, error);
+ }
+}
+
+void pylon_camera_set_roi(guint16 roi_x, guint16 roi_y, guint16 roi_width, guint16 roi_height, GError** error)
+{
+ g_assert(pGrabber);
+ try
+ {
+ GrabAPI::ROI roi(roi_x, roi_y, roi_width, roi_height);
+ pGrabber->set_roi(roi);
+ }
+ catch (const yat::Exception& e)
+ {
+ yat_exception_to_gerror(e, error);
+ }
+}
+
void pylon_camera_start_acquision(GError** error)
{
g_assert(pGrabber);