-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMicroscopeManagerGUI.h
More file actions
97 lines (85 loc) · 2.64 KB
/
MicroscopeManagerGUI.h
File metadata and controls
97 lines (85 loc) · 2.64 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_MicroscopeManagerGUI.h"
#include "MicroscopeManager.h"
#include "AcquisitionDisplayThread.h"
#include "ProducerDisplayThread.h"
#include <RangeSlider.h>
#include "SerialQueueObject.h"
#include "WriterThread.h"
class MicroscopeManagerGUI : public QMainWindow
{
Q_OBJECT
public:
MicroscopeManagerGUI(QWidget *parent = Q_NULLPTR);
~MicroscopeManagerGUI();
public slots:
void updateDisplayFrame(const QPixmap & pixmap, bool acq);
void connectSerialDevice(std::string deviceName, std::string port, int baudrate, std::vector<std::string> exitCommands);
void connectSerialDevice(std::string deviceName, std::string port, int baudrate, std::vector<std::string> exitCommands, std::vector<std::string> startCommands);
void readFromSerialDevice(std::string message);
private slots:
void writeConfig();
void readConfig();
void snapImage();
void acquireHelper();
void acquireStart();
void acquireStop();
void liveHelper();
void liveStart();
void liveStop();
void experimentSetup();
void startExperiment();
void stopExperiment();
void setTargetFrame();
void calibrateCameraMask();
void setFilename();
void openConnectSerialDialog();
void disconnectSerialDevice();
void writeToSerialDevice();
void moveScrollBarToBottom(int min, int max);
void setVolumeScaleSliderMin();
void setVolumeScaleSliderMax();
void setVolumeScaleMin();
void setVolumeScaleMax();
void setFramesPerVolume();
void setVolumesPerSecond();
void setLaserMode();
void setScannerAmplitude();
void addOdorant();
void shuffleOdorants();
void addState();
private:
void startupMenu();
void defaultStartup();
void writeExperimentParameter(char parameter, std::string data);
Ui::MicroscopeManagerGUIClass ui;
MicroscopeManager* mm;
std::string imageManagerType;
std::string configFile;
unsigned char * buf;
QImage img;
unsigned long long width;
unsigned long long height;
MMThread* cameraThd;
bool acquiring;
bool experimentActive;
bool fileOpened;
std::string filepath;
int imageCount;
std::map<std::string, MMThread*> serialThds;
SerialQueueObject* serialQueue;
RangeSlider* volumeScale;
double volumeScaleMin;
double volumeScaleMax;
int framesPerVolume;
int volumesPerSecond;
int laserMode;
float laserPower;
double scannerAmplitude;
int* targetFrameInfo;
std::string experimentSettingsDevice;
std::string experimentDescription;
std::vector<std::pair<char, int>> stateAndDuration;
std::vector<char> odorants;
};