forked from RTMilliken/EDFbrowser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.h
199 lines (171 loc) · 4.83 KB
/
global.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#ifndef EDFBROWSER_GLOBAL_H
#define EDFBROWSER_GLOBAL_H
#include <stdio.h>
#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__)
#define fopeno fopen
#else
#define fseeko fseeko64
#define ftello ftello64
#define fopeno fopen64
#endif
#define PROGRAM_NAME "EDFbrowser"
#define PROGRAM_VERSION "2.0.1"
#define MINIMUM_QT_VERSION 0x040701
#define MAXFILES 32
#define MAXSIGNALS 512
#define MAXFILTERS 16
#define TIME_DIMENSION (10000000LL)
#define MAX_ANNOTATION_LEN 512
#define VIEWTIME_SYNCED_OFFSET 0
#define VIEWTIME_SYNCED_ABSOLUT 1
#define VIEWTIME_UNSYNCED 2
#define VIEWTIME_USER_DEF_SYNCED 3
#define MAX_PATH_LENGTH 1024
#define MAX_RECENTFILES 32
#define MAX_ACTIVE_ANNOT_MARKERS 64
#define MAXSPECTRUMDIALOGS 32
#define MAXSPECTRUMDOCKS 8
#define MAXPREDEFINEDMONTAGES 12
#define MAXAVERAGECURVEDIALOGS 32
#define MAXZSCOREDIALOGS 32
#define ANNOT_ID_NK_TRIGGER 0
#define ANNOT_ID_BS_TRIGGER 1
#define VIDEO_STATUS_STOPPED 0
#define VIDEO_STATUS_STARTUP_1 1
#define VIDEO_STATUS_STARTUP_2 2
#define VIDEO_STATUS_STARTUP_3 3
#define VIDEO_STATUS_STARTUP_4 4
#define VIDEO_STATUS_STARTUP_5 5
#define VIDEO_STATUS_PLAYING 16
#define VIDEO_STATUS_PAUSED 17
#define VIDEO_STATUS_ENDED 18
#include <stdio.h>
#include "multitargetsupport.h"
#include "filter.h"
#include "third_party/fidlib/fidlib.h"
#include "ravg_filter.h"
#include "spike_filter.h"
#include "ecg_filter.h"
#include "z_ratio_filter.h"
struct edfparamblock{
char label[17];
char transducer[81];
char physdimension[9];
double phys_min;
double phys_max;
int dig_min;
int dig_max;
char prefilter[81];
int smp_per_record;
char reserved[33];
double offset;
int buf_offset;
double bitvalue;
int annotation;
};
struct edfhdrblock{
FILE *file_hdl;
int file_num;
char version[32];
char filename[MAX_PATH_LENGTH];
char patient[81];
char recording[81];
char plus_patientcode[81];
char plus_gender[16];
char plus_birthdate[16];
char plus_patient_name[81];
char plus_patient_additional[81];
char plus_startdate[16];
char plus_admincode[81];
char plus_technician[81];
char plus_equipment[81];
char plus_recording_additional[81];
long long l_starttime;
long long utc_starttime;
char reserved[45];
int hdrsize;
int edfsignals;
long long datarecords;
int recordsize;
int annot_ch[256];
int nr_annot_chns;
int edf;
int edfplus;
int bdf;
int bdfplus;
int discontinuous;
int genuine_nk;
int nk_triggers_read;
int genuine_biosemi;
double data_record_duration;
long long long_data_record_duration;
long long viewtime;
long long starttime_offset;
long long prefiltertime;
int annots_not_read;
int recording_len_sec;
struct edfparamblock *edfparam;
};
struct zoomhistoryblock{
int pntr;
int history_size_tail;
int history_size_front;
long long viewtime[64][MAXFILES];
long long pagetime[64];
double voltpercm[64][MAXSIGNALS];
double sensitivity[64][MAXSIGNALS][MAXSIGNALS];
double screen_offset[64][MAXSIGNALS];
};
struct annotationblock{
int file_num;
long long onset;
char duration[16];
char annotation[MAX_ANNOTATION_LEN + 1];
struct annotationblock *former_annotation;
struct annotationblock *next_annotation;
int modified;
int x_pos;
int selected;
int jump;
int hided;
int hided_in_list;
unsigned int ident;
};
struct active_markersblock{
int file_num;
struct annotationblock *list[MAX_ACTIVE_ANNOT_MARKERS];
int count;
int selected;
};
struct graphicLineStruct{
int x1;
int y1;
int x2;
int y2;
};
struct graphicBufStruct{
struct graphicLineStruct graphicLine[MAXSIGNALS];
};
struct crossHairStruct{
int color;
int file_num;
int active;
int moving;
int position;
int x_position;
int y_position;
int y_value;
double value;
long long time;
long long time_relative;
};
struct video_player_struct{
int status;
int cntdwn_timer;
int poll_timer;
long long utc_starttime;
int starttime_diff;
int stop_det_counter;
int fpos;
};
#endif