© 2016 Thorlabs Scientific Imaging184
DCx Camera Functional Description and SDK Manual
Example transparency
//------------------------------------
// Transparency
//------------------------------------
// Enable semi-transparent overlay
is_DirectRenderer (hCam, DR_ENABLE_SEMI_TRANSPARENT_OVERLAY, NULL, NULL);
// Disable semi-transparent overlay
is_DirectRenderer (hCam, DR_DISABLE_SEMI_TRANSPARENT_OVERLAY, NULL, NULL);
Example synchronization
//------------------------------------
// Synchronization
//------------------------------------
// Enable auto-synchronization
is_DirectRenderer (hCam, DR_SET_VSYNC_AUTO, NULL, NULL);
// User defined synchronization: Query range and set position
UINT UserSync[2];
is_DirectRenderer (hCam, DR_GET_USER_SYNC_POSITION_RANGE,
(void*)UserSync, sizeof (UserSync));
INT Min = UserSync[0];
INT Max = UserSync[1];
INT SyncPosition = 400;
is_DirectRenderer (hCam, DR_SET_USER_SYNC,
void*)&SyncPosition, sizeof (SyncPosition));
// Disable synchronization
is_DirectRenderer (hCam, DR_SET_VSYNC_OFF, NULL, NULL);
Example overlay with BMP
//------------------------------------
// BMP file
//------------------------------------
// Load overlay from BMP file
is_DirectRenderer (hCam, DR_LOAD_OVERLAY_FROM_FILE,
(void*)”c:\test.bmp”, NULL);
//------------------------------------
// Delete overlay
//------------------------------------
// Delete overlay area
is_DirectRenderer (hCam, DR_CLEAR_OVERLAY, NULL, NULL);
Example steal mode
//------------------------------------
// Steal mode
//------------------------------------
// Get and set color mode for image to be copied
INT nColorMode;
is_DirectRenderer (hCam, DR_GET_STEAL_FORMAT,
(void*)&nColorMode, sizeof (nColorMode));
nColorMode = IS_CM_MONO8;
is_DirectRenderer (hCam, DR_SET_STEAL_FORMAT,
void*)&nColorMode, sizeof (nColorMode));
// Copy image with function returning immediately
INT nwait = IS_DONT_WAIT;
is_DirectRenderer(hCam, DR_STEAL_NEXT_FRAME,
(void*)&wait, sizeof (wait));