// Configure width and offset X for all zonescamera.Width.SetValue(200);camera.OffsetX.SetValue(100);// Select zone 0camera.ROIZoneSelector.SetValue(ROIZoneSelector_Zone0);// Set the vertical offset for the selected zonecamera.ROIZoneOffset.SetValue(100);// Set the height for the selected zonecamera.ROIZoneSize.SetValue(100);// Enable the selected zonecamera.ROIZoneMode.SetValue(ROIZoneMode_On);// Select zone 1camera.ROIZoneSelector.SetValue(ROIZoneSelector_Zone1);// Set the vertical offset for the selected zonecamera.ROIZoneOffset.SetValue(250);// Set the height for the selected zonecamera.ROIZoneSize.SetValue(200);// Enable the selected zonecamera.ROIZoneMode.SetValue(ROIZoneMode_On);
INodeMap&nodemap=camera.GetNodeMap();// Configure width and offset X for all zonesCIntegerParameter(nodemap,"Width").SetValue(200);CIntegerParameter(nodemap,"OffsetX").SetValue(100);// Select zone 0CEnumParameter(nodemap,"ROIZoneSelector").SetValue("Zone0");// Set the vertical offset for the selected zoneCIntegerParameter(nodemap,"ROIZoneOffset").SetValue(100);// Set the height for the selected zoneCIntegerParameter(nodemap,"ROIZoneSize").SetValue(100);// Enable the selected zoneCEnumParameter(nodemap,"ROIZoneMode").SetValue("On");// Select zone 1CEnumParameter(nodemap,"ROIZoneSelector").SetValue("Zone1");// Set the vertical offset for the selected zoneCIntegerParameter(nodemap,"ROIZoneOffset").SetValue(250);// Set the height for the selected zoneCIntegerParameter(nodemap,"ROIZoneSize").SetValue(200);// Enable the selected zoneCEnumParameter(nodemap,"ROIZoneMode").SetValue("On");
// Configure width and offset X for all zonescamera.Parameters[PLCamera.Width].SetValue(200);camera.Parameters[PLCamera.OffsetX].SetValue(100);// Select zone 0camera.Parameters[PLCamera.ROIZoneSelector].SetValue(PLCamera.ROIZoneSelector.Zone0);// Set the vertical offset for the selected zonecamera.Parameters[PLCamera.ROIZoneOffset].SetValue(100);// Set the height for the selected zonecamera.Parameters[PLCamera.ROIZoneSize].SetValue(100);// Enable the selected zonecamera.Parameters[PLCamera.ROIZoneMode].SetValue(PLCamera.ROIZoneMode.On);// Select zone 1camera.Parameters[PLCamera.ROIZoneSelector].SetValue(PLCamera.ROIZoneSelector.Zone1);// Set the vertical offset for the selected zonecamera.Parameters[PLCamera.ROIZoneOffset].SetValue(250);// Set the height for the selected zonecamera.Parameters[PLCamera.ROIZoneSize].SetValue(200);// Enable the selected zonecamera.Parameters[PLCamera.ROIZoneMode].SetValue(PLCamera.ROIZoneMode.On);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods *//* Configure width and offset X for all zones */errRes=PylonDeviceSetIntegerFeature(hdev,"Width",200);CHECK(errRes);errRes=PylonDeviceSetIntegerFeature(hdev,"OffsetX",100);CHECK(errRes);/* Select zone 0 */errRes=PylonDeviceFeatureFromString(hdev,"ROIZoneSelector","Zone0");CHECK(errRes);/* Set the vertical offset for the selected zone */errRes=PylonDeviceSetIntegerFeature(hdev,"ROIZoneOffset",100);CHECK(errRes);/* Set the height for the selected zone */errRes=PylonDeviceSetIntegerFeature(hdev,"ROIZoneSize",100);CHECK(errRes);/* Enable the selected zone */errRes=PylonDeviceFeatureFromString(hdev,"ROIZoneMode","On");CHECK(errRes);/* Select zone 1 */errRes=PylonDeviceFeatureFromString(hdev,"ROIZoneSelector","Zone1");CHECK(errRes);/* Set the vertical offset for the selected zone */errRes=PylonDeviceSetIntegerFeature(hdev,"ROIZoneOffset",250);CHECK(errRes);/* Set the height for the selected zone */errRes=PylonDeviceSetIntegerFeature(hdev,"ROIZoneSize",200);CHECK(errRes);/* Enable the selected zone */errRes=PylonDeviceFeatureFromString(hdev,"ROIZoneMode","On");CHECK(errRes);
# Configure width and offset X for all zonescamera.Width.Value=200camera.OffsetX.Value=100# Select zone 0camera.ROIZoneSelector.Value="Zone0"# Set the vertical offset for the selected zonecamera.ROIZoneOffset.Value=100# Set the height for the selected zonecamera.ROIZoneSize.Value=100# Enable the selected zonecamera.ROIZoneMode.Value="On"# Select zone 1camera.ROIZoneSelector.Value="Zone1"# Set the vertical offset for the selected zonecamera.ROIZoneOffset.Value=250# Set the height for the selected zonecamera.ROIZoneSize.Value=200# Enable the selected zonecamera.ROIZoneMode.Value="On"