Repository navigation
Expand file tree
/
Copy pathcoll_server.h
More file actions
104 lines (85 loc) · 2.49 KB
/
Copy pathcoll_server.h
File metadata and controls
104 lines (85 loc) · 2.49 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
98
99
100
101
102
103
104
#ifndef COLL_SERVER_H
#define COLL_SERVER_H
#include <QTimer>
#include <QTcpServer>
#include <vector>
#include <set>
#include "collclient.h"
#include "collthread.h"
#include <QNetworkAccessManager>
#include "colldetection.h"
class CollServer:public QTcpServer
{
Q_OBJECT
public:
CollServer(QString port,QString image,QString neuron,QString ananame,QString prefix,QObject *parent=nullptr);
virtual ~CollServer();
void incomingConnection(qintptr handle);
bool addmarkers(const QString msg, QString comment);
void delmarkers(const QString msg);
CollDetection* detectUtil;
static CollServer* getInstance();
QStringList msglist;
int processedmsgcnt = 0;
int savedmsgcnt = 0;
int receivedcnt = 0;
QMap<QString,CollClient*> hashmap;//user->client
V_NeuronSWC_list segments;
V_NeuronSWC_list last1MinSegments;
V_NeuronSWC_list last3MinSegments;
V_NeuronSWC_list segmentsForOthersDetect;
V_NeuronSWC_list segmentsForMissingDetect;
QList<CellAPO> markers;
QString swcpath;
QString apopath;
QString anopath;
QMutex mutex;
QMutex mutexForDetectOthers;
QMutex mutexForDetectMissing;
QString RES;
bool isSomaExists;
XYZ somaCoordinate;
signals:
// void clientAddMarker(QString);
void clientSendMsgs(QStringList);
void clientUpdatesendmsgcnt();
void clientSendmsgs2client(int);
void clientDeleteLater();
void clientDisconnectFromHost(CollClient*);
void imediateSaveDone();
public slots:
void imediateSave(bool);
void autoSave();
void autoExit();
void RemoveList(QThread* thread);
void startTimerForDetectLoops();
void startTimerForDetectOthers();
void startTimerForDetectTip();
void startTimerForDetectCrossing();
void startTimerForDetectWhole();
private:
// qsizetype idxforprocessed=0;
QString Port;
QString Image;
QString Neuron;
QString AnoName;
QString Prefix;
QTimer *timerForAutoSave;
QTimer *timerForDetectLoops;
QTimer *timerForDetectOthers;
QTimer *timerForDetectWhole;
QTimer *timerForDetectTip;
QTimer *timerForDetectCrossing;
QTimer *timerForAutoExit;
static CollServer* curServer;
QList<CollThread*> list_thread;
public:
QString getAnoName();
QString getImage();
QTimer* getTimerForDetectLoops();
QTimer* getTimerForDetectOthers();
QTimer* getTimerForDetectTip();
QTimer* getTimerForDetectCrossing();
QTimer* getTimerForDetectWhole();
};
#endif // COLL_SERVER_H