summaryrefslogtreecommitdiffstats
path: root/src/cameras/uca-pylon-camera.c
diff options
context:
space:
mode:
authorVolker Kaiser <volker.kaiser@softwareschneiderei.de>2012-07-26 14:42:07 +0200
committerVolker Kaiser <volker.kaiser@softwareschneiderei.de>2012-07-26 15:36:43 +0200
commitc16b7cccb72374be1ad6aed2310c137dc4ed4e0c (patch)
treefe562a4667f6a83182da0ac9cba3be9d9a510146 /src/cameras/uca-pylon-camera.c
parenta8d04f213275d2de122f27f2471b6d47850c77fd (diff)
downloaduca-c16b7cccb72374be1ad6aed2310c137dc4ed4e0c.tar.gz
uca-c16b7cccb72374be1ad6aed2310c137dc4ed4e0c.tar.bz2
uca-c16b7cccb72374be1ad6aed2310c137dc4ed4e0c.tar.xz
uca-c16b7cccb72374be1ad6aed2310c137dc4ed4e0c.zip
SCHNEIDE-348
Diffstat (limited to 'src/cameras/uca-pylon-camera.c')
-rw-r--r--src/cameras/uca-pylon-camera.c57
1 files changed, 56 insertions, 1 deletions
diff --git a/src/cameras/uca-pylon-camera.c b/src/cameras/uca-pylon-camera.c
index 44b0e57..152ff01 100644
--- a/src/cameras/uca-pylon-camera.c
+++ b/src/cameras/uca-pylon-camera.c
@@ -50,7 +50,9 @@ GQuark uca_pylon_camera_error_quark()
}
enum {
- N_PROPERTIES = N_BASE_PROPERTIES
+ PROP_ROI_WIDTH_DEFAULT = N_BASE_PROPERTIES,
+ PROP_ROI_HEIGHT_DEFAULT,
+ N_PROPERTIES
};
static gint base_overrideables[] = {
@@ -290,6 +292,16 @@ static void uca_pylon_camera_get_property(GObject *object, guint property_id, GV
}
break;
+ case PROP_ROI_WIDTH_DEFAULT:
+ pylon_camera_get_sensor_size(&priv->width, &priv->height, &error);
+ g_value_set_uint(value, priv->width);
+ break;
+
+ case PROP_ROI_HEIGHT_DEFAULT:
+ pylon_camera_get_sensor_size(&priv->width, &priv->height, &error);
+ g_value_set_uint(value, priv->height);
+ break;
+
case PROP_ROI_WIDTH_MULTIPLIER:
g_value_set_uint(value, 1);
break;
@@ -368,6 +380,49 @@ static void uca_pylon_camera_class_init(UcaPylonCameraClass *klass)
"Name of the camera",
"", G_PARAM_READABLE);
+ /*guint sensor_width = 0;
+ guint sensor_height = 0;
+ GError* error;
+ pylon_camera_get_sensor_size(&sensor_width, &sensor_height, &error);*/
+
+ pylon_properties[PROP_ROI_WIDTH_DEFAULT] =
+ g_param_spec_uint("roi-width-default",
+ "ROI width default value",
+ "ROI width default value",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE);
+ pylon_properties[PROP_ROI_HEIGHT_DEFAULT] =
+ g_param_spec_uint("roi-height-default",
+ "ROI height default value",
+ "ROI height default value",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE);
+ /*g_object_class_install_property(gobject_class, PROP_ROI_X, pylon_properties[PROP_ROI_X]);
+
+
+ pylon_properties[PROP_ROI_Y] =
+ g_param_spec_uint(uca_camera_props[PROP_ROI_Y],
+ "Vertical coordinate",
+ "Vertical coordinate",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE);
+ g_object_class_install_property(gobject_class, PROP_ROI_Y, pylon_properties[PROP_ROI_Y]);
+
+ pylon_properties[PROP_ROI_WIDTH] =
+ g_param_spec_uint(uca_camera_props[PROP_ROI_WIDTH],
+ "Width",
+ "Width of the region of interest",
+ 1, G_MAXUINT, 500,
+ G_PARAM_READWRITE);
+ g_object_class_install_property(gobject_class, PROP_ROI_WIDTH, pylon_properties[PROP_ROI_WIDTH]);
+
+ pylon_properties[PROP_ROI_HEIGHT] =
+ g_param_spec_uint(uca_camera_props[PROP_ROI_HEIGHT],
+ "Height",
+ "Height of the region of interest",
+ 1, G_MAXUINT, 100,
+ G_PARAM_READWRITE);
+ g_object_class_install_property(gobject_class, PROP_ROI_HEIGHT, pylon_properties[PROP_ROI_HEIGHT]); */
for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++)
g_object_class_install_property(gobject_class, id, pylon_properties[id]);