EasyManua.ls Logo

THORLABS DCC1645C - Page 265

THORLABS DCC1645C
530 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
© 2013 Thorlabs GmbH
4 Programming (SDK)
263
Example 4
// Save user-defined list to file
char File1[100];
ZeroMemory(File1, sizeof(File1));
strcpy(File1, "c:\\test.txt");
nRet = is_HotPixel(hCam, IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST, (void*)File1, 0);
nRet = is_HotPixel(hCam, IS_HOTPIXEL_SAVE_SOFTWARE_USER_LIST, (void*)File1, 0);
// Unicode
wchar_t File2[100];
ZeroMemory(File2, sizeof(File2));
wcscpy(File2, L"c:\\test.txt");
nRet = is_HotPixel(hCam, IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST_UNICODE, (void*)File2, 0);
nRet = is_HotPixel(hCam, IS_HOTPIXEL_SAVE_SOFTWARE_USER_LIST_UNICODE, (void*)File2, 0);
Example 5
// Save user-defined list to the camera EEPROM
INT nNumber = 0;
INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_CAMERA_USER_LIST_MAX_NUMBER,
(void*)&nNumber , sizeof(nNumber));
if (nRet == IS_SUCCESS)
{
// Write the maximum number of hot pixels to EEPROM
WORD *pList = new WORD[1 + 2 * nNumber];
pList[0] = nNumber;
for (int i = 0; i < nNumber; i++)
{
pList[1 + 2 * i] = x_value;
pList[2 + 2 * i] = y_value;
}
nRet = is_HotPixel(hCam, IS_HOTPIXEL_SET_CAMERA_USER_LIST,
(void*)pList, (1 + 2 * nNumber) * sizeof(WORD));
delete [] pList;
// Delete user-defined EEPROM list
nRet = is_HotPixel(hCam, IS_HOTPIXEL_DELETE_CAMERA_USER_LIST, NULL, NULL);
}
Example 6
// Return combined list
INT nNumber = 0;
INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_MERGED_CAMERA_LIST_NUMBER,
(void*)&nNumber , sizeof(nNumber));
if (nRet == IS_SUCCESS)
{
// Allocate sufficient memory. Each hot pixel needs two WORDS
// memory space.
// Additional memory space of one WORD per hot pixel is required for numbering.
WORD *pList = new WORD[1 + 2 * nNumber];
nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_MERGED_CAMERA_LIST,
(void*)pList, (1 + 2 * nNumber) * sizeof(WORD));
// Delete unneeded list
delete [] pList;
}

Table of Contents

Other manuals for THORLABS DCC1645C

Related product manuals