Line 21... |
Line 21... |
21 |
// Static methods
|
21 |
// Static methods
|
22 |
// InterfaceCameraList
|
22 |
// InterfaceCameraList
|
23 |
if (!strcmp("GetInterfaceCameraList", cmd)) {
|
23 |
if (!strcmp("GetInterfaceCameraList", cmd)) {
|
24 |
// Call the method
|
24 |
// Call the method
|
25 |
vector< vector<CameraInfo> > interfaceCameraList;
|
25 |
vector< vector<CameraInfo> > interfaceCameraList;
|
26 |
interfaceCameraList = Camera::GetInterfaceCameraList();
|
26 |
interfaceCameraList = CameraFactory::GetInterfaceCameraList();
|
27 |
unsigned int nCameras = 0;
|
27 |
unsigned int nCameras = 0;
|
28 |
for(unsigned int i=0; i<interfaceCameraList.size(); i++)
|
28 |
for(unsigned int i=0; i<interfaceCameraList.size(); i++)
|
29 |
nCameras += interfaceCameraList[i].size();
|
29 |
nCameras += interfaceCameraList[i].size();
|
30 |
const char* fieldNames[] = {"interfaceNum", "cameraNum", "vendor","model"};
|
30 |
const char* fieldNames[] = {"interfaceNum", "cameraNum", "vendor","model"};
|
31 |
plhs[0] = mxCreateStructMatrix(1, nCameras, 4, fieldNames);
|
31 |
plhs[0] = mxCreateStructMatrix(1, nCameras, 4, fieldNames);
|
Line 50... |
Line 50... |
50 |
if (nrhs < 3)
|
50 |
if (nrhs < 3)
|
51 |
mexErrMsgTxt("newCamera: Expected interface and camera number argument.");
|
51 |
mexErrMsgTxt("newCamera: Expected interface and camera number argument.");
|
52 |
unsigned int interfaceNum = (unsigned int)mxGetScalar(prhs[1]);
|
52 |
unsigned int interfaceNum = (unsigned int)mxGetScalar(prhs[1]);
|
53 |
unsigned int camNum = (unsigned int)mxGetScalar(prhs[2]);
|
53 |
unsigned int camNum = (unsigned int)mxGetScalar(prhs[2]);
|
54 |
// Return a handle to a new C++ instance
|
54 |
// Return a handle to a new C++ instance
|
55 |
plhs[0] = convertPtr2Mat<Camera>(Camera::NewCamera(interfaceNum, camNum, triggerModeSoftware));
|
55 |
plhs[0] = convertPtr2Mat<Camera>(CameraFactory::NewCamera(interfaceNum, camNum, triggerModeSoftware));
|
56 |
return;
|
56 |
return;
|
57 |
}
|
57 |
}
|
58 |
|
58 |
|
59 |
// Class methods
|
59 |
// Class methods
|
60 |
// Check if there is a second input, which should be the class instance handle
|
60 |
// Check if there is a second input, which should be the class instance handle
|