-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCameraThread.h
81 lines (68 loc) · 1.94 KB
/
CameraThread.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
namespace forms2{
ref class Form1;
ref class ImageData;
//ref class CameraDriver;
class CameraSettings;
ref class Driver;
using namespace System;
using namespace System::Collections::Generic;
using namespace DataStructures;
public ref class CameraThread
{
public:
CameraThread(Form1^ f, String^ path){init(f,path);}
~CameraThread(){closeCamera(); }
void initCamera();
bool acquire(int layers, bool runLoop);
void stop();
void interrupt(bool callback);
bool openCameraDialog();
bool isRunning();
void setSingleFrame(bool sf){singleFrame=sf;}
bool getSingleFrame() {return singleFrame;}
void setPath(String^ path);
void setSave(bool saveFiles);
void setNextTime(DateTime nexttime);
void setSeqVars(LinkedList<Variable^>^ vars);
void closeCamera();
int changeCamera(String^ camname);
String^ getCameraDriverName();
static const int CAM_NOT_CHANGED = 1;
private:
delegate void DelegateInt(int value);
delegate void DelegateVoid();
delegate void DelegateImg(ImageData^ img);
DelegateInt^ setLayersReadMainWindow;
DelegateVoid^ loopFinishedMainWindow;
DelegateImg^ setImgMainWindow;
Form1^ mainForm;
//CameraDriver^ camDriver;
//CameraDriver* camDriver;
bool continueImageLoop;
bool interruptImageLoop;
bool callBack;
String^ filePath;
String^ continueLock;
String^ interruptLock;
bool singleFrame;
bool running;
bool cameraInited;
bool save;
CameraSettings* camSet;
Driver^ driver;//Driver REF
DateTime nextTime;
LinkedList<Variable^>^ seqVars;
static DateTime NO_TIME = DateTime(1,1,1);
void init(Form1^ f, String^ path);
bool getContinue();
void setContinue(bool c);
bool getInterrupt();
void setInterrupt(bool c);
void takeImages(Object^ layersObj);
void finishedRunning();
void readLayers(int layersRead);
void gotImage(ImageData^ img);
//void saveImage(ImageData^ img);//UInt16 rows, UInt16 cols, UInt16 lays, UInt16 *buf);
};
}