-
Notifications
You must be signed in to change notification settings - Fork 12
/
class_xdf.html
707 lines (635 loc) · 37.5 KB
/
class_xdf.html
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libxdf: Xdf Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libxdf
 <span id="projectnumber">0.92</span>
</div>
<div id="projectbrief">A static C++ library for loading XDF files</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_xdf.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="class_xdf-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Xdf Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <<a class="el" href="xdf_8h_source.html">xdf.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_xdf_1_1_stream.html">Stream</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a4e3322abfe4d533d6b7a96cbbea7271a"><td class="memItemLeft" align="right" valign="top">typedef std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a4e3322abfe4d533d6b7a96cbbea7271a">eventName</a></td></tr>
<tr class="memdesc:a4e3322abfe4d533d6b7a96cbbea7271a"><td class="mdescLeft"> </td><td class="mdescRight">Used as <code>std::vector<std::pair<std::pair<eventName, eventTimeStamp>, int> ></code> in eventMap. <a href="#a4e3322abfe4d533d6b7a96cbbea7271a">More...</a><br /></td></tr>
<tr class="separator:a4e3322abfe4d533d6b7a96cbbea7271a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1fbf3d641262cc1daade33eca1789990"><td class="memItemLeft" align="right" valign="top">typedef float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a1fbf3d641262cc1daade33eca1789990">eventTimeStamp</a></td></tr>
<tr class="memdesc:a1fbf3d641262cc1daade33eca1789990"><td class="mdescLeft"> </td><td class="mdescRight">Used as <code>std::vector<std::pair<std::pair<eventName, eventTimeStamp>, int> ></code> in eventMap. <a href="#a1fbf3d641262cc1daade33eca1789990">More...</a><br /></td></tr>
<tr class="separator:a1fbf3d641262cc1daade33eca1789990"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7900b5a4f3792b9d59a5d43db821607e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a7900b5a4f3792b9d59a5d43db821607e">Xdf</a> ()</td></tr>
<tr class="memdesc:a7900b5a4f3792b9d59a5d43db821607e"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor with no parameter. <a href="#a7900b5a4f3792b9d59a5d43db821607e">More...</a><br /></td></tr>
<tr class="separator:a7900b5a4f3792b9d59a5d43db821607e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa7dc1ef8c04216d703604bf868146428"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#aa7dc1ef8c04216d703604bf868146428">adjustTotalLength</a> ()</td></tr>
<tr class="memdesc:aa7dc1ef8c04216d703604bf868146428"><td class="mdescLeft"> </td><td class="mdescRight">Adjust <code>totalLen</code> to avoid possible deviation. <a href="#aa7dc1ef8c04216d703604bf868146428">More...</a><br /></td></tr>
<tr class="separator:aa7dc1ef8c04216d703604bf868146428"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a75ef15a72071fe0d36ef6311214518fe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a75ef15a72071fe0d36ef6311214518fe">calcTotalLength</a> (int sampleRate)</td></tr>
<tr class="memdesc:a75ef15a72071fe0d36ef6311214518fe"><td class="mdescLeft"> </td><td class="mdescRight">Calculate the globle length (in samples). <a href="#a75ef15a72071fe0d36ef6311214518fe">More...</a><br /></td></tr>
<tr class="separator:a75ef15a72071fe0d36ef6311214518fe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad98829202c9ae64505c9ecc7796c8ddc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#ad98829202c9ae64505c9ecc7796c8ddc">createLabels</a> ()</td></tr>
<tr class="memdesc:ad98829202c9ae64505c9ecc7796c8ddc"><td class="mdescLeft"> </td><td class="mdescRight">Create labels for each channel and store them in <em>labels</em> vector. <a href="#ad98829202c9ae64505c9ecc7796c8ddc">More...</a><br /></td></tr>
<tr class="separator:ad98829202c9ae64505c9ecc7796c8ddc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4d2c5859af84542a15a80c906465f4e3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a4d2c5859af84542a15a80c906465f4e3">detrend</a> ()</td></tr>
<tr class="memdesc:a4d2c5859af84542a15a80c906465f4e3"><td class="mdescLeft"> </td><td class="mdescRight">Subtract the entire channel by its mean. <a href="#a4d2c5859af84542a15a80c906465f4e3">More...</a><br /></td></tr>
<tr class="separator:a4d2c5859af84542a15a80c906465f4e3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a12332c25006e2c6d71883c368c3c1f61"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a12332c25006e2c6d71883c368c3c1f61">freeUpTimeStamps</a> ()</td></tr>
<tr class="memdesc:a12332c25006e2c6d71883c368c3c1f61"><td class="mdescLeft"> </td><td class="mdescRight">Delete the time stamps vectors when no longer needed to release some memory. <a href="#a12332c25006e2c6d71883c368c3c1f61">More...</a><br /></td></tr>
<tr class="separator:a12332c25006e2c6d71883c368c3c1f61"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a993e94535d6d9e544a64ffbbb2bb4e8c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a993e94535d6d9e544a64ffbbb2bb4e8c">load_xdf</a> (std::string filename)</td></tr>
<tr class="memdesc:a993e94535d6d9e544a64ffbbb2bb4e8c"><td class="mdescLeft"> </td><td class="mdescRight">The main function of loading an XDF file. <a href="#a993e94535d6d9e544a64ffbbb2bb4e8c">More...</a><br /></td></tr>
<tr class="separator:a993e94535d6d9e544a64ffbbb2bb4e8c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a67c5890ac84f257e91bdb93dcbe958ae"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a67c5890ac84f257e91bdb93dcbe958ae">resample</a> (int userSrate)</td></tr>
<tr class="memdesc:a67c5890ac84f257e91bdb93dcbe958ae"><td class="mdescLeft"> </td><td class="mdescRight">Resample all streams and channel to a chosen sample rate. <a href="#a67c5890ac84f257e91bdb93dcbe958ae">More...</a><br /></td></tr>
<tr class="separator:a67c5890ac84f257e91bdb93dcbe958ae"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a072e657d7620d61080a15a215c691210"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a072e657d7620d61080a15a215c691210">writeEventsToXDF</a> (std::string file_path)</td></tr>
<tr class="memdesc:a072e657d7620d61080a15a215c691210"><td class="mdescLeft"> </td><td class="mdescRight">writeEventsToXDF <a href="#a072e657d7620d61080a15a215c691210">More...</a><br /></td></tr>
<tr class="separator:a072e657d7620d61080a15a215c691210"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:acc12687ca26e8352afb960d459c5947a"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="struct_xdf_1_1_stream.html">Stream</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#acc12687ca26e8352afb960d459c5947a">streams</a></td></tr>
<tr class="separator:acc12687ca26e8352afb960d459c5947a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d7401eb1557b2f34ac0ff4b9f79d04f"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a1d7401eb1557b2f34ac0ff4b9f79d04f">version</a></td></tr>
<tr class="separator:a1d7401eb1557b2f34ac0ff4b9f79d04f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac0b5d7d53fb28832594718cc16f65184"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#ac0b5d7d53fb28832594718cc16f65184">totalLen</a> = 0</td></tr>
<tr class="separator:ac0b5d7d53fb28832594718cc16f65184"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a44da046e191b2ae90b9bfe4de8d58ea3"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a44da046e191b2ae90b9bfe4de8d58ea3">minTS</a> = 0</td></tr>
<tr class="separator:a44da046e191b2ae90b9bfe4de8d58ea3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6874a847c980f296ebbcf703fa48096a"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a6874a847c980f296ebbcf703fa48096a">maxTS</a> = 0</td></tr>
<tr class="separator:a6874a847c980f296ebbcf703fa48096a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9b4fc485a140ba5020a48ca5fa2e45ea"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a9b4fc485a140ba5020a48ca5fa2e45ea">totalCh</a> = 0</td></tr>
<tr class="separator:a9b4fc485a140ba5020a48ca5fa2e45ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac65175994e0e2eeec4dd2f4688cd2040"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#ac65175994e0e2eeec4dd2f4688cd2040">majSR</a> = 0</td></tr>
<tr class="separator:ac65175994e0e2eeec4dd2f4688cd2040"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3cb480731a20caa480e3e6744acb562c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a3cb480731a20caa480e3e6744acb562c">maxSR</a> = 0</td></tr>
<tr class="separator:a3cb480731a20caa480e3e6744acb562c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa02e5a435186cdabbaf2487068c53dbc"><td class="memItemLeft" align="right" valign="top">std::vector< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#aa02e5a435186cdabbaf2487068c53dbc">streamMap</a></td></tr>
<tr class="separator:aa02e5a435186cdabbaf2487068c53dbc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a45004fc495cad33768fae80b996a68db"><td class="memItemLeft" align="right" valign="top">std::vector< std::pair< std::pair< <a class="el" href="class_xdf.html#a4e3322abfe4d533d6b7a96cbbea7271a">eventName</a>, <a class="el" href="class_xdf.html#a1fbf3d641262cc1daade33eca1789990">eventTimeStamp</a> >, int > > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a45004fc495cad33768fae80b996a68db">eventMap</a></td></tr>
<tr class="separator:a45004fc495cad33768fae80b996a68db"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a26a2b517f020dc9f188c2277c76add85"><td class="memItemLeft" align="right" valign="top">std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a26a2b517f020dc9f188c2277c76add85">dictionary</a></td></tr>
<tr class="separator:a26a2b517f020dc9f188c2277c76add85"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4acb87e86380bf7266976cd6c4cb3826"><td class="memItemLeft" align="right" valign="top">std::vector< uint16_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a4acb87e86380bf7266976cd6c4cb3826">eventType</a></td></tr>
<tr class="separator:a4acb87e86380bf7266976cd6c4cb3826"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a250d6f79d0333887393eab248fee3c93"><td class="memItemLeft" align="right" valign="top">std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a250d6f79d0333887393eab248fee3c93">labels</a></td></tr>
<tr class="separator:a250d6f79d0333887393eab248fee3c93"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:add8aceaf68ad49b708f4df29f439778d"><td class="memItemLeft" align="right" valign="top">std::set< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#add8aceaf68ad49b708f4df29f439778d">sampleRateMap</a></td></tr>
<tr class="separator:add8aceaf68ad49b708f4df29f439778d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a2b080f29080a5c521de907769d9419"><td class="memItemLeft" align="right" valign="top">std::vector< float > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a1a2b080f29080a5c521de907769d9419">offsets</a></td></tr>
<tr class="separator:a1a2b080f29080a5c521de907769d9419"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e46bbbf31121fb394aa8cf5c10d10b0"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a1e46bbbf31121fb394aa8cf5c10d10b0">fileHeader</a></td></tr>
<tr class="separator:a1e46bbbf31121fb394aa8cf5c10d10b0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a83d5309d854b1052fa575b539a69c58d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a83d5309d854b1052fa575b539a69c58d">userAddedStream</a> { 0 }</td></tr>
<tr class="separator:a83d5309d854b1052fa575b539a69c58d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b1496a8667d67b90836696a1e2da618"><td class="memItemLeft" align="right" valign="top">std::vector< std::pair< std::string, double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_xdf.html#a7b1496a8667d67b90836696a1e2da618">userCreatedEvents</a></td></tr>
<tr class="separator:a7b1496a8667d67b90836696a1e2da618"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_xdf.html">Xdf</a> class is designed to store the data of an entire XDF file. It comes with methods to read XDF files and containers to store the data, as well as some additional methods e.g. resampling etc. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a4e3322abfe4d533d6b7a96cbbea7271a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e3322abfe4d533d6b7a96cbbea7271a">§ </a></span>eventName</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef std::string <a class="el" href="class_xdf.html#a4e3322abfe4d533d6b7a96cbbea7271a">Xdf::eventName</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used as <code>std::vector<std::pair<std::pair<eventName, eventTimeStamp>, int> ></code> in eventMap. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#a45004fc495cad33768fae80b996a68db">eventMap</a> </dd></dl>
</div>
</div>
<a id="a1fbf3d641262cc1daade33eca1789990"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fbf3d641262cc1daade33eca1789990">§ </a></span>eventTimeStamp</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef float <a class="el" href="class_xdf.html#a1fbf3d641262cc1daade33eca1789990">Xdf::eventTimeStamp</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used as <code>std::vector<std::pair<std::pair<eventName, eventTimeStamp>, int> ></code> in eventMap. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#a45004fc495cad33768fae80b996a68db">eventMap</a> </dd></dl>
</div>
</div>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a7900b5a4f3792b9d59a5d43db821607e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7900b5a4f3792b9d59a5d43db821607e">§ </a></span>Xdf()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Xdf::Xdf </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor with no parameter. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aa7dc1ef8c04216d703604bf868146428"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7dc1ef8c04216d703604bf868146428">§ </a></span>adjustTotalLength()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xdf::adjustTotalLength </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Adjust <code>totalLen</code> to avoid possible deviation. </p>
<p><code>totalLen</code> is calculated by multiplying the difference between max time stamp and minimal time stamp by the <code>majSR</code> (major sample rate). However, this can be inaccurate. In case any channel is longer than <code>totalLen</code>, this function will make <code>totalLen</code> match the length of that channel.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#ac0b5d7d53fb28832594718cc16f65184">totalLen</a>, <a class="el" href="class_xdf.html#ac65175994e0e2eeec4dd2f4688cd2040">majSR</a>, <a class="el" href="class_xdf.html#a75ef15a72071fe0d36ef6311214518fe" title="Calculate the globle length (in samples). ">calcTotalLength()</a> </dd></dl>
</div>
</div>
<a id="a75ef15a72071fe0d36ef6311214518fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75ef15a72071fe0d36ef6311214518fe">§ </a></span>calcTotalLength()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xdf::calcTotalLength </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>sampleRate</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the globle length (in samples). </p>
<p>This is calculated by multiplying the rage from the earliest time stamp to the last time stamp across all channels by the parameter sampleRate.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sampleRate</td><td>is the sample rate you wish to use to calculate the total length. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ad98829202c9ae64505c9ecc7796c8ddc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad98829202c9ae64505c9ecc7796c8ddc">§ </a></span>createLabels()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xdf::createLabels </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create labels for each channel and store them in <em>labels</em> vector. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#a250d6f79d0333887393eab248fee3c93">labels</a>, <a class="el" href="class_xdf.html#a1a2b080f29080a5c521de907769d9419">offsets</a> </dd></dl>
</div>
</div>
<a id="a4d2c5859af84542a15a80c906465f4e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d2c5859af84542a15a80c906465f4e3">§ </a></span>detrend()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xdf::detrend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Subtract the entire channel by its mean. </p>
<p>Sigviewer displays both the channel signals as well as the zero baseline. Thus when the mean of a channel is too high or too low it would be very hard to see the fluctuation. Subtract the entire channel by its mean will make the signal fluctuate around the zero baseline, and has better visual effect. The mean of each channel times <code>-1</code> will be stored in member vector <code>offsets</code></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#a1a2b080f29080a5c521de907769d9419">offsets</a> </dd></dl>
</div>
</div>
<a id="a12332c25006e2c6d71883c368c3c1f61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12332c25006e2c6d71883c368c3c1f61">§ </a></span>freeUpTimeStamps()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xdf::freeUpTimeStamps </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete the time stamps vectors when no longer needed to release some memory. </p>
<p>Sigviewer doesn't demand time stamps to display signals except irregular sample rate channels, events, and the first time stamp of each channel (used to decide where does a channel start when putting all streams together). In this case we can delete the time stamps when no longer needed to free up some memory. </p>
</div>
</div>
<a id="a993e94535d6d9e544a64ffbbb2bb4e8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a993e94535d6d9e544a64ffbbb2bb4e8c">§ </a></span>load_xdf()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Xdf::load_xdf </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The main function of loading an XDF file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>is the path to the file being loaded including the file name. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a67c5890ac84f257e91bdb93dcbe958ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67c5890ac84f257e91bdb93dcbe958ae">§ </a></span>resample()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Xdf::resample </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>userSrate</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resample all streams and channel to a chosen sample rate. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">userSrate</td><td>is recommended to be between integer 1 and the highest sample rate of the current file. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a072e657d7620d61080a15a215c691210"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a072e657d7620d61080a15a215c691210">§ </a></span>writeEventsToXDF()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Xdf::writeEventsToXDF </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"><em>file_path</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>writeEventsToXDF </p>
<p>If user added some markups and events in Sigviewer, this function can store those user created events back to the XDF file in a new stream </p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a26a2b517f020dc9f188c2277c76add85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26a2b517f020dc9f188c2277c76add85">§ </a></span>dictionary</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<std::string> Xdf::dictionary</td>
</tr>
</table>
</div><div class="memdoc">
<p>The vector to store unique event types with no repetitions. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#a45004fc495cad33768fae80b996a68db">eventMap</a> </dd></dl>
</div>
</div>
<a id="a45004fc495cad33768fae80b996a68db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45004fc495cad33768fae80b996a68db">§ </a></span>eventMap</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<std::pair<std::pair<<a class="el" href="class_xdf.html#a4e3322abfe4d533d6b7a96cbbea7271a">eventName</a>, <a class="el" href="class_xdf.html#a1fbf3d641262cc1daade33eca1789990">eventTimeStamp</a>>, int> > Xdf::eventMap</td>
</tr>
</table>
</div><div class="memdoc">
<p>The vector to store all the events across all streams. The format is <<events, timestamps>, streamNum>. </p>
</div>
</div>
<a id="a4acb87e86380bf7266976cd6c4cb3826"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4acb87e86380bf7266976cd6c4cb3826">§ </a></span>eventType</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<uint16_t> Xdf::eventType</td>
</tr>
</table>
</div><div class="memdoc">
<p>The vector to store events by their index in the dictionary.</p><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_xdf.html#a26a2b517f020dc9f188c2277c76add85">dictionary</a>, <a class="el" href="class_xdf.html#a45004fc495cad33768fae80b996a68db">eventMap</a> </dd></dl>
</div>
</div>
<a id="a1e46bbbf31121fb394aa8cf5c10d10b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e46bbbf31121fb394aa8cf5c10d10b0">§ </a></span>fileHeader</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string Xdf::fileHeader</td>
</tr>
</table>
</div><div class="memdoc">
<p>Raw XML of the file header. </p>
</div>
</div>
<a id="a250d6f79d0333887393eab248fee3c93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a250d6f79d0333887393eab248fee3c93">§ </a></span>labels</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<std::string> Xdf::labels</td>
</tr>
</table>
</div><div class="memdoc">
<p>The vector to store descriptive labels of each channel. </p>
</div>
</div>
<a id="ac65175994e0e2eeec4dd2f4688cd2040"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac65175994e0e2eeec4dd2f4688cd2040">§ </a></span>majSR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Xdf::majSR = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>The sample rate that has the most channels across all streams. </p>
</div>
</div>
<a id="a3cb480731a20caa480e3e6744acb562c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cb480731a20caa480e3e6744acb562c">§ </a></span>maxSR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Xdf::maxSR = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>Highest sample rate across all streams. </p>
</div>
</div>
<a id="a6874a847c980f296ebbcf703fa48096a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6874a847c980f296ebbcf703fa48096a">§ </a></span>maxTS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float Xdf::maxTS = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>The largest time stamp across all streams. </p>
</div>
</div>
<a id="a44da046e191b2ae90b9bfe4de8d58ea3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44da046e191b2ae90b9bfe4de8d58ea3">§ </a></span>minTS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float Xdf::minTS = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>The smallest time stamp across all streams. </p>
</div>
</div>
<a id="a1a2b080f29080a5c521de907769d9419"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a2b080f29080a5c521de907769d9419">§ </a></span>offsets</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<float> Xdf::offsets</td>
</tr>
</table>
</div><div class="memdoc">
<p>Offsets of each channel after using subtractMean() function </p>
</div>
</div>
<a id="add8aceaf68ad49b708f4df29f439778d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add8aceaf68ad49b708f4df29f439778d">§ </a></span>sampleRateMap</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::set<double> Xdf::sampleRateMap</td>
</tr>
</table>
</div><div class="memdoc">
<p>The vector to store all sample rates across all the streams. </p>
</div>
</div>
<a id="aa02e5a435186cdabbaf2487068c53dbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa02e5a435186cdabbaf2487068c53dbc">§ </a></span>streamMap</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<int> Xdf::streamMap</td>
</tr>
</table>
</div><div class="memdoc">
<p>A vector indexes which channels belong to which stream. The index is the same as channel number; the actual content is the stream Number </p>
</div>
</div>
<a id="acc12687ca26e8352afb960d459c5947a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc12687ca26e8352afb960d459c5947a">§ </a></span>streams</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<<a class="el" href="struct_xdf_1_1_stream.html">Stream</a>> Xdf::streams</td>
</tr>
</table>
</div><div class="memdoc">
<p>A vector to store all the streams of the current XDF file. </p>
</div>
</div>
<a id="a9b4fc485a140ba5020a48ca5fa2e45ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b4fc485a140ba5020a48ca5fa2e45ea">§ </a></span>totalCh</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t Xdf::totalCh = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>The total number of channel count. </p>
</div>
</div>
<a id="ac0b5d7d53fb28832594718cc16f65184"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0b5d7d53fb28832594718cc16f65184">§ </a></span>totalLen</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t Xdf::totalLen = 0</td>
</tr>
</table>
</div><div class="memdoc">
<p>The total length is the product of the range between the smallest time stamp and the largest multiplied by the major sample rate. </p>
</div>
</div>
<a id="a83d5309d854b1052fa575b539a69c58d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83d5309d854b1052fa575b539a69c58d">§ </a></span>userAddedStream</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Xdf::userAddedStream { 0 }</td>
</tr>
</table>
</div><div class="memdoc">
<p>For Sigviewer only: if user manually added events in Sigviewer, the events will be stored in a new stream after all current streams. The index will be userAddedStream. </p>
</div>
</div>
<a id="a7b1496a8667d67b90836696a1e2da618"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b1496a8667d67b90836696a1e2da618">§ </a></span>userCreatedEvents</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<std::pair<std::string, double> > Xdf::userCreatedEvents</td>
</tr>
</table>
</div><div class="memdoc">
<p>User created events in Sigviewer. </p>
</div>
</div>
<a id="a1d7401eb1557b2f34ac0ff4b9f79d04f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d7401eb1557b2f34ac0ff4b9f79d04f">§ </a></span>version</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float Xdf::version</td>
</tr>
</table>
</div><div class="memdoc">
<p>The version of XDF file </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/Users/Yida Lin/Documents/GitHub/libxdf/libxdf/<a class="el" href="xdf_8h_source.html">xdf.h</a></li>
<li>C:/Users/Yida Lin/Documents/GitHub/libxdf/libxdf/<a class="el" href="xdf_8cpp.html">xdf.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_xdf.html">Xdf</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
</ul>
</div>
</body>
</html>