File: patch_sigviewer_0.5.1-as.4-DisplayHeaderInfo%2BEventTableAlways4Columns%2BSampleRateChanged2FLOAT64%2BlibbiosigEventTable.diff

package info (click to toggle)
biosig4c%2B%2B 1.3.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,144 kB
  • sloc: ansic: 30,471; cpp: 7,543; makefile: 1,630; python: 65; awk: 58; sh: 4; ruby: 2
file content (1078 lines) | stat: -rw-r--r-- 45,322 bytes parent folder | download | duplicates (2)
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
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
Index: src/file_handling/basic_header.h
===================================================================
--- src/file_handling/basic_header.h	(revision 556)
+++ src/file_handling/basic_header.h	(working copy)
@@ -38,7 +38,7 @@
     {return recording_info_;}
 
     //-------------------------------------------------------------------------
-    float getSampleRate () const;
+    float64 getSampleRate () const;
 
     //-------------------------------------------------------------------------
     QSharedPointer<SignalChannel const> getChannel (ChannelID id) const;
@@ -47,7 +47,7 @@
     unsigned getNumberChannels() const;
 
     //-------------------------------------------------------------------------
-    virtual uint32 getNumberOfSamples () const = 0;
+    virtual size_t getNumberOfSamples () const = 0;
 
     //-------------------------------------------------------------------------
     virtual QMap<unsigned, QString> getNamesOfUserSpecificEvents () const
@@ -73,7 +73,7 @@
 
     //-------------------------------------------------------------------------
     /// required
-    void setSampleRate (float sample_rate);
+    void setSampleRate (float64 sample_rate);
 
     //-------------------------------------------------------------------------
     /// required
@@ -92,7 +92,7 @@
 private:
     QString const file_path_;
     QString file_type_string_;
-    float sample_rate_;
+    float64 sample_rate_;
     QMap<ChannelID, QSharedPointer<SignalChannel const> > channels_;
     QMap<QString, QString> recording_info_;
     QMap<QString, QString> patient_info_;
Index: src/file_handling/channel_manager.h
===================================================================
--- src/file_handling/channel_manager.h	(revision 556)
+++ src/file_handling/channel_manager.h	(working copy)
@@ -43,13 +43,13 @@
                                                      unsigned length) const = 0;
 
     //-------------------------------------------------------------------------
-    virtual float32 getDurationInSec () const = 0;
+    virtual float64 getDurationInSec () const = 0;
 
     //-------------------------------------------------------------------------
-    virtual uint32 getNumberSamples () const = 0;
+    virtual size_t getNumberSamples () const = 0;
 
     //-------------------------------------------------------------------------
-    virtual float32 getSampleRate () const = 0;
+    virtual float64 getSampleRate () const = 0;
 
     //-------------------------------------------------------------------------
     void addDownsampledMinMaxVersion (ChannelID id, QSharedPointer<DataBlock const> min,
Index: src/file_handling/basic_header.cpp
===================================================================
--- src/file_handling/basic_header.cpp	(revision 556)
+++ src/file_handling/basic_header.cpp	(working copy)
@@ -12,7 +12,7 @@
 }
 
 //-----------------------------------------------------------------------------
-float32 BasicHeader::getSampleRate () const
+float64 BasicHeader::getSampleRate () const
 {
     return sample_rate_;
 }
@@ -61,7 +61,7 @@
 }
 
 //-------------------------------------------------------------------------
-void BasicHeader::setSampleRate (float sample_rate)
+void BasicHeader::setSampleRate (float64 sample_rate)
 {
     sample_rate_ = sample_rate;
 }
Index: src/src.pro
===================================================================
--- src/src.pro	(revision 556)
+++ src/src.pro	(working copy)
@@ -33,7 +33,7 @@
 INCLUDEPATH += $$_PRO_FILE_PWD_/../extern/include \
                $$_PRO_FILE_PWD_/.
 LIBS += -L$$_PRO_FILE_PWD_/../extern/lib \
-    -lbiosig# \
+    -lbiosig -lcholmod -lz -lcurl \
     #-lGDF
 
 RESOURCES = src.qrc
Index: src/version.txt
===================================================================
--- src/version.txt	(revision 556)
+++ src/version.txt	(working copy)
@@ -1,2 +1,2 @@
-0.5.1
+0.5.1-as.5
 
Index: src/file_handling_impl/sinus_dummy_reader.cpp
===================================================================
--- src/file_handling_impl/sinus_dummy_reader.cpp	(revision 556)
+++ src/file_handling_impl/sinus_dummy_reader.cpp	(working copy)
@@ -29,10 +29,11 @@
             data->push_back (sin(sample_index / ((i*i+1))));
         QSharedPointer<DataBlock const> data_block (new FixedDataBlock (data, 100));
         data_.insert(i, data_block);
-
+/*
         QSharedPointer<SignalChannel> channel (new SignalChannel(i,
                                                    QString::number(i)));
         header->addDummyChannel(i, channel);
+*/
         header_ = header;
     }
 
Index: src/file_handling_impl/biosig_reader.cpp
===================================================================
--- src/file_handling_impl/biosig_reader.cpp	(revision 556)
+++ src/file_handling_impl/biosig_reader.cpp	(working copy)
@@ -4,7 +4,7 @@
     Copyright (C) Thomas Brunner  2005,2006,2007
     Copyright (C) Christoph Eibel 2007,2008
     Copyright (C) Clemens Brunner 2006,2007,2008
-    Copyright (C) Alois Schloegl  2008,2009
+    Copyright (C) Alois Schloegl  2008,2009,2011
     Copyright (C) Oliver Terbu    2008
     This file is part of the "SigViewer" repository
     at http://biosig.sf.net/
@@ -57,6 +57,12 @@
 FILE_SIGNAL_READER_REGISTRATION(cnt, BioSigReader);
 FILE_SIGNAL_READER_REGISTRATION(vhdr, BioSigReader);
 FILE_SIGNAL_READER_REGISTRATION(bkr, BioSigReader);
+FILE_SIGNAL_READER_REGISTRATION(gz,  BioSigReader);
+FILE_SIGNAL_READER_REGISTRATION(itx, BioSigReader);
+FILE_SIGNAL_READER_REGISTRATION(rec, BioSigReader);
+FILE_SIGNAL_READER_REGISTRATION(acq, BioSigReader);
+FILE_SIGNAL_READER_REGISTRATION(bva, BioSigReader);
+FILE_SIGNAL_READER_REGISTRATION(hea, BioSigReader);
 
 FILE_SIGNAL_READER_REGISTRATION(evt, BioSigReader);
 
@@ -101,10 +107,8 @@
 void BioSigReader::doClose () const
 {
     if (biosig_header_)
-    {
-        sclose (biosig_header_);
         destructHDR (biosig_header_);
-    }
+
     biosig_header_ = 0;
 }
 
@@ -181,7 +185,7 @@
             destructHDR(biosig_header_);
             biosig_header_ = 0;
             delete c_file_name;
-            return "file not supported";
+            return B4C_ERRMSG;
     }
 
     // (C) 2008 AS: EVENT.DUR and EVENT.CHN are optional in SOPEN, but SigViewer needs them.
@@ -281,10 +285,10 @@
 void BioSigReader::bufferAllEvents () const
 {
     unsigned number_events = biosig_header_->EVENT.N;
+    // Hack Hack: Transforming Events to have the same sample rate as the signals
+    double rate_transition = basic_header_->getEventSamplerate() / biosig_header_->EVENT.SampleRate;
     for (unsigned index = 0; index < number_events; index++)
     {
-        // Hack Hack: Transforming Events to have the same sample rate as the signals
-        double rate_transition = basic_header_->getEventSamplerate() / biosig_header_->EVENT.SampleRate;
         QSharedPointer<SignalEvent> event (new SignalEvent (biosig_header_->EVENT.POS[index] * rate_transition,
                                                             biosig_header_->EVENT.TYP[index],
                                                             biosig_header_->EVENT.SampleRate * rate_transition));
@@ -295,7 +299,12 @@
             else
                 event->setChannel (biosig_header_->EVENT.CHN[index] - 1);
             event->setDuration (biosig_header_->EVENT.DUR[index] * rate_transition);
-        }
+        } 
+	else 
+	{
+		event->setChannel (UNDEFINED_CHANNEL);
+		event->setDuration (1);
+	}
         events_.append (event);
     }
 
Index: src/file_handling_impl/biosig_writer.cpp
===================================================================
--- src/file_handling_impl/biosig_writer.cpp	(revision 556)
+++ src/file_handling_impl/biosig_writer.cpp	(working copy)
@@ -73,7 +73,7 @@
                                               std::set<EventType> const& types)
 {
     if (file_formats_support_event_saving_.count(target_type_) == 0)
-        return QObject::tr("Can't write events to that file that file type!");
+        return QObject::tr("Can't write events to that file type!");
 
 
     QList<EventID> events;
@@ -109,7 +109,6 @@
     if (error)
         QMessageBox::critical(0, "Events not saved!!!", QString::number(error));
 
-    sclose (header);
     destructHDR (header);
 
     return "";
Index: src/file_handling_impl/event_table_file_reader.cpp
===================================================================
--- src/file_handling_impl/event_table_file_reader.cpp	(revision 556)
+++ src/file_handling_impl/event_table_file_reader.cpp	(working copy)
@@ -1,3 +1,25 @@
+/*
+
+    $Id$
+    Copyright (C) Christoph Eibel 2010 
+    Copyright (C) Alois Schloegl  2011
+		and others ???
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>. 
+    
+*/
+
 #include "event_table_file_reader.h"
 
 #include <QFile>
@@ -16,9 +38,8 @@
 //-------------------------------------------------------------------------------------------------
 EventTableFileReader::EventTableFileReader()
 {
-    QSettings settings;
-    QString event_codes_file = settings.value ("eventcodes_file", ":/eventcodes.txt").toString();
-    load (event_codes_file);
+    load ();
+
     event_group_ids_.append (UNKNOWN_GROUP_ID);
     group_id2name_[UNKNOWN_GROUP_ID] = UNKNOWN_GROUP_ID;
 }
@@ -29,60 +50,28 @@
     // nothing
 }
 
-// load
-bool EventTableFileReader::load(const QString& file_name)
+// load pre-defined event codes from libbiosig
+bool EventTableFileReader::load()
 {
-    event_file_path_ = file_name;
-    QFile file(file_name);
-    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
-        return false;
-
-    // load event type table
-    QTextStream file_stream(&file); 
-    QString group_id;
-    while (true)
-    {
-        QString one_line = file_stream.readLine();
-        if (one_line.isEmpty())
-        {
-            break;
-        }
-        if (one_line.indexOf("### 0x") == 0)
-        {
-            group_id = one_line.mid(4, 6);
-            if (!group_id2name_.contains(group_id))
-            {
-                QString group_name;
-                int32 begin_name = one_line.indexOf(QRegExp("[^ \t]"), 10);
-                if (begin_name != -1)
-                {
-                    group_name = one_line.mid(begin_name);
-                }
-                group_id2name_[group_id] = group_name;
+	char g[10];
+	uint16_t k;
+	for (k = 0; EventCodeGroups[k].groupid < 0xffff; k++) {
+	        sprintf(g,"0x%04x", EventCodeGroups[k].groupid);
+		QString group_id = QString(g);
+	        group_id2name_[group_id] = QString(EventCodeGroups[k].GroupDescription);
                 event_group_ids_ << group_id;
-            }
-        }
-        else if (one_line.indexOf("0x") == 0)
-        {
-            uint16 event_type_id = one_line.mid(0, 6).toInt(0, 16);
-            if (!event_type2name_.contains(event_type_id))
-            {
-                EventItem item;
-                int32 begin_name = one_line.indexOf(QRegExp("[^ \t]"), 6);
-                if (begin_name != -1)
-                {
-                    item.name = one_line.mid(begin_name);
-                }
+	}
+
+        EventItem item;
+	for (k=0; ETD[k].typ ; k++) {
+	        sprintf(g,"0x%04x", ETD[k].groupid);
+		QString group_id = QString(g);
+		item.name     =  QString(ETD[k].desc);
                 item.group_id = group_id;
-                event_type2name_[event_type_id] = item;
-                event_types_ << event_type_id;
-            }
-        }
-    }
-    file.close();
-    qSort(event_types_);
-    qSort(event_group_ids_);
-    return true;
+                event_type2name_[ETD[k].typ] = item;
+                event_types_ << ETD[k].typ;
+	}
+        return true;
 }
 
 // get group id begin
@@ -127,7 +116,7 @@
 //-----------------------------------------------------------------------------
 void EventTableFileReader::restoreEventNames ()
 {
-    load (event_file_path_);
+    load ();
 }
 
 //-----------------------------------------------------------------------------
Index: src/file_handling_impl/file_handling_impl.pri
===================================================================
--- src/file_handling_impl/file_handling_impl.pri	(revision 556)
+++ src/file_handling_impl/file_handling_impl.pri	(working copy)
@@ -5,8 +5,8 @@
     file_handling_impl/event_table_file_reader.h \
     file_handling_impl/channel_manager_impl.h \
     file_handling_impl/biosig_basic_header.h \
-    file_handling_impl/sinus_dummy_reader.h \
-    file_handling_impl/sinus_dummy_header.h \
+    #file_handling_impl/sinus_dummy_reader.h \
+    #file_handling_impl/sinus_dummy_header.h \
     file_handling_impl/file_handler_factory_registrator.h #\
     #file_handling_impl/gdf/gdf_file_signal_writer.h \
     #file_handling_impl/gdf/gdf_file_signal_reader.h \
@@ -23,8 +23,8 @@
     file_handling_impl/event_table_file_reader.cpp \
     file_handling_impl/channel_manager_impl.cpp \
     file_handling_impl/biosig_basic_header.cpp \
-    file_handling_impl/sinus_dummy_reader.cpp \
-    file_handling_impl/sinus_dummy_header.cpp #\
+    #file_handling_impl/sinus_dummy_reader.cpp \
+    #file_handling_impl/sinus_dummy_header.cpp #\
     #file_handling_impl/gdf/gdf_file_signal_writer.cpp \
     #file_handling_impl/gdf/gdf_file_signal_reader.cpp \
     #file_handling_impl/gdf/gdf_basic_header.cpp \
Index: src/file_handling_impl/event_table_file_reader.h
===================================================================
--- src/file_handling_impl/event_table_file_reader.h	(revision 556)
+++ src/file_handling_impl/event_table_file_reader.h	(working copy)
@@ -1,3 +1,27 @@
+/*
+
+    $Id$
+    Copyright (C) Christoph Eibel 2010 
+    Copyright (C) Alois Schloegl  2011
+		and others ???
+    This file is part of the "SigViewer" repository 
+    at http://biosig.sf.net/ 
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>. 
+    
+*/
+
 // event_table_file_reader.h
 
 #ifndef EVENT_TABLE_FILE_READER
@@ -4,6 +28,7 @@
 #define EVENT_TABLE_FILE_READER
 
 #include "base/sigviewer_user_types.h"
+#include "biosig.h"
 
 #include <QStringList>
 #include <QMap>
@@ -11,6 +36,7 @@
 
 #include <set>
 
+
 class QTextStream;
 
 namespace SigViewer_
@@ -53,8 +79,7 @@
 
     std::set<uint16> getAllEventTypes () const;
 private:
-    bool load(const QString& file_name);
-
+    bool load();
     static QString const UNKNOWN_GROUP_ID;
 
     struct EventItem
@@ -69,11 +94,11 @@
     Q_DISABLE_COPY(EventTableFileReader)
 
     QList<EventType> event_types_;
+    Int2EventItemMap event_type2name_;
+
     QStringList event_group_ids_;
-    Int2EventItemMap event_type2name_;
     String2StringMap group_id2name_;
 
-    QString event_file_path_;
 };
 
 } // namespace SigViewer_
Index: src/file_handling_impl/channel_manager_impl.cpp
===================================================================
--- src/file_handling_impl/channel_manager_impl.cpp	(revision 556)
+++ src/file_handling_impl/channel_manager_impl.cpp	(working copy)
@@ -66,7 +66,7 @@
 }
 
 //-----------------------------------------------------------------------------
-float32 ChannelManagerImpl::getDurationInSec () const
+float64 ChannelManagerImpl::getDurationInSec () const
 {
     return reader_->getBasicHeader()->getNumberOfSamples() /
            reader_->getBasicHeader()->getSampleRate();
@@ -74,13 +74,13 @@
 
 
 //-----------------------------------------------------------------------------
-uint32 ChannelManagerImpl::getNumberSamples () const
+size_t ChannelManagerImpl::getNumberSamples () const
 {
     return reader_->getBasicHeader()->getNumberOfSamples();
 }
 
 //-----------------------------------------------------------------------------
-float32 ChannelManagerImpl::getSampleRate () const
+float64 ChannelManagerImpl::getSampleRate () const
 {
     return reader_->getBasicHeader()->getSampleRate();
 }
Index: src/file_handling_impl/biosig_basic_header.cpp
===================================================================
--- src/file_handling_impl/biosig_basic_header.cpp	(revision 556)
+++ src/file_handling_impl/biosig_basic_header.cpp	(working copy)
@@ -1,3 +1,26 @@
+/*
+
+    $Id$
+    Copyright (C) Christoph Eibel 2010, 2011
+    Copyright (C) Alois Schloegl 2011
+    This file is part of the "SigViewer" repository
+    at http://biosig.sf.net/
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
 #include "biosig_basic_header.h"
 
 #include <ctime>
@@ -16,14 +39,14 @@
         for (unsigned index = 0; index < raw_header->EVENT.LenCodeDesc; index++)
         {
             if (raw_header->EVENT.CodeDesc[index])
-                user_defined_event_map_[index+1] = QString(raw_header->EVENT.CodeDesc[index]);
+                user_defined_event_map_[index] = QString(raw_header->EVENT.CodeDesc[index]);
         }
     }
 
 
     setFileTypeString (QString (GetFileTypeString(raw_header->TYPE)).append(" v").append(QString::number(raw_header->VERSION)));
 
-    float sampling_rate = raw_header->SampleRate;
+    float64 sampling_rate = raw_header->SampleRate;
 
     setSampleRate (sampling_rate);
     readChannelsInfo (raw_header);
@@ -32,7 +55,7 @@
 }
 
 //-----------------------------------------------------------------------------
-uint32 BiosigBasicHeader::getNumberOfSamples () const
+size_t BiosigBasicHeader::getNumberOfSamples () const
 {
     return ceil(static_cast<double>(number_samples_));
 }
@@ -48,6 +71,7 @@
 {
     for (unsigned channel_index = 0; channel_index < raw_header->NS; channel_index++)
     {
+/*
         QString label = QString (QByteArray(raw_header->CHANNEL[channel_index].Label, MAX_LENGTH_LABEL)).trimmed();
 
         char p[MAX_LENGTH_PHYSDIM+1];
@@ -56,8 +80,8 @@
         QString phys_y_dim_label = QString (p).trimmed();
         if (phys_y_dim_label.compare("uV") == 0)
             phys_y_dim_label = QString (QChar((ushort)0xb5)).append("V");
-        QSharedPointer<SignalChannel> channel (new SignalChannel(channel_index, label,
-                                                                 phys_y_dim_label));
+*/
+        QSharedPointer<SignalChannel> channel (new SignalChannel(channel_index, raw_header));
         addChannel (channel_index, channel);
     }
 }
Index: src/file_handling_impl/channel_manager_impl.h
===================================================================
--- src/file_handling_impl/channel_manager_impl.h	(revision 556)
+++ src/file_handling_impl/channel_manager_impl.h	(working copy)
@@ -41,13 +41,13 @@
                                                      unsigned length) const;
 
     //-------------------------------------------------------------------------
-    virtual float32 getDurationInSec () const;
+    virtual float64 getDurationInSec () const;
 
     //-------------------------------------------------------------------------
-    virtual uint32 getNumberSamples () const;
+    virtual size_t getNumberSamples () const;
 
     //-------------------------------------------------------------------------
-    virtual float32 getSampleRate () const;
+    virtual float64 getSampleRate () const;
 
 private:
     FileSignalReader* reader_;
Index: src/file_handling_impl/sinus_dummy_header.h
===================================================================
--- src/file_handling_impl/sinus_dummy_header.h	(revision 556)
+++ src/file_handling_impl/sinus_dummy_header.h	(working copy)
@@ -13,7 +13,7 @@
     SinusDummyHeader ();
 
     //-------------------------------------------------------------------------
-    virtual uint32 getNumberOfSamples () const {return 10000;}
+    virtual size_t getNumberOfSamples () const {return 10000;}
 
     //-------------------------------------------------------------------------
     void addDummyChannel (ChannelID id, QSharedPointer<SignalChannel const> channel)
Index: src/file_handling_impl/biosig_basic_header.h
===================================================================
--- src/file_handling_impl/biosig_basic_header.h	(revision 556)
+++ src/file_handling_impl/biosig_basic_header.h	(working copy)
@@ -14,7 +14,7 @@
     BiosigBasicHeader (HDRTYPE* raw_header, QString const& file_path);
 
     //-------------------------------------------------------------------------
-    virtual uint32 getNumberOfSamples () const;
+    virtual size_t getNumberOfSamples () const;
 
     //-------------------------------------------------------------------------
     virtual QMap<unsigned, QString> getNamesOfUserSpecificEvents () const;
Index: src/gui_impl/signal_browser/signal_browser_model_4.cpp
===================================================================
--- src/gui_impl/signal_browser/signal_browser_model_4.cpp	(revision 556)
+++ src/gui_impl/signal_browser/signal_browser_model_4.cpp	(working copy)
@@ -358,7 +358,7 @@
 //-------------------------------------------------------------------------
 void SignalBrowserModel::goToSample (unsigned sample)
 {
-    float32 position = 0;
+    float64 position = 0;
     while (position < getSignalViewSettings()->getPixelsPerSample() * sample)
         position += getSignalViewSettings()->getPixelsPerSample();
     position -= getSignalViewSettings()->getPixelsPerSample();
Index: src/gui_impl/dialogs/basic_header_info_dialog.cpp
===================================================================
--- src/gui_impl/dialogs/basic_header_info_dialog.cpp	(revision 556)
+++ src/gui_impl/dialogs/basic_header_info_dialog.cpp	(working copy)
@@ -1,3 +1,26 @@
+/*
+
+    $Id: biosig_reader.cpp,v 1.36 2009/03/03 11:57:07 cle1109 Exp $
+    Copyright (C) Christoph Eibel 2010, 2011
+    Copyright (C) Alois Schloegl  2011
+    This file is part of the "SigViewer" repository
+    at http://biosig.sf.net/
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License
+    as published by the Free Software Foundation; either version 3
+    of the License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
 // basic_header_info_dialog.cpp
 
 #include "basic_header_info_dialog.h"
@@ -176,7 +199,9 @@
         tmp_item = new QTreeWidgetItem(channel_item);
 
         tmp_item->setText(0, tr("Sample Rate"));
-        tmp_item->setText(1, QString::number(basic_header_->getSampleRate()));
+        float64 fs = channel->getSampleRate();
+        if (fs < 0.0) fs = basic_header_->getSampleRate();
+        tmp_item->setText(1, QString::number(fs));
         tmp_item->setText(2, tr("Hz"));
 
         tmp_item = new QTreeWidgetItem(channel_item);
Index: src/gui_impl/dialogs/about_dialog.ui
===================================================================
--- src/gui_impl/dialogs/about_dialog.ui	(revision 556)
+++ src/gui_impl/dialogs/about_dialog.ui	(working copy)
@@ -47,17 +47,11 @@
 &lt;tr&gt;
 &lt;td style=&quot;border: none;&quot;&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:11pt; font-weight:600;&quot;&gt;SigViewer [VERSION-NUMBER]&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://sigviewer.sf.net&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://sigviewer.sourceforge.net/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://sigviewer.sf.net&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://biosig.sourceforge.net/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Clemens Brunner (Coordinator)&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Christoph Eibel&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Thomas Brunner&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Laboratory of Brain-Computer Interfaces&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Graz University of Technology&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://bci.tugraz.at&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://bci.tugraz.at/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Thanks to:&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Alois Schlögl (&lt;/span&gt;&lt;a href=&quot;http://biosig.sourceforge.net/&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;BioSig&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;Laurent de Soras (&lt;/span&gt;&lt;a href=&quot;http://ldesoras.free.fr/prod.html&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;FFTReal&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
        </property>
Index: src/gui_impl/processed_signal_channel_manager.cpp
===================================================================
--- src/gui_impl/processed_signal_channel_manager.cpp	(revision 556)
+++ src/gui_impl/processed_signal_channel_manager.cpp	(working copy)
@@ -4,7 +4,7 @@
 {
 
 //-------------------------------------------------------------------------
-ProcessedSignalChannelManager::ProcessedSignalChannelManager (float32 sample_rate, unsigned length, QObject* parent)
+ProcessedSignalChannelManager::ProcessedSignalChannelManager (float64 sample_rate, unsigned length, QObject* parent)
     : QObject (parent),
       sample_rate_ (sample_rate),
       length_ (length)
@@ -69,19 +69,19 @@
 }
 
 //-------------------------------------------------------------------------
-float32 ProcessedSignalChannelManager::getDurationInSec () const
+float64 ProcessedSignalChannelManager::getDurationInSec () const
 {
     return static_cast<float32>(length_) / sample_rate_;
 }
 
 //-------------------------------------------------------------------------
-uint32 ProcessedSignalChannelManager::getNumberSamples () const
+size_t ProcessedSignalChannelManager::getNumberSamples () const
 {
     return length_;
 }
 
 //-------------------------------------------------------------------------
-float32 ProcessedSignalChannelManager::getSampleRate () const
+float64 ProcessedSignalChannelManager::getSampleRate () const
 {
     return sample_rate_;
 }
Index: src/gui_impl/processed_signal_channel_manager.h
===================================================================
--- src/gui_impl/processed_signal_channel_manager.h	(revision 556)
+++ src/gui_impl/processed_signal_channel_manager.h	(working copy)
@@ -13,7 +13,7 @@
 {
 public:
     //-------------------------------------------------------------------------
-    ProcessedSignalChannelManager (float32 sample_rate, unsigned length, QObject* parent);
+    ProcessedSignalChannelManager (float64 sample_rate, unsigned length, QObject* parent);
 
     //-------------------------------------------------------------------------
     void addChannel (ChannelID id, QSharedPointer<DataBlock const> data_block,
@@ -44,13 +44,13 @@
                                                      unsigned length) const;
 
     //-------------------------------------------------------------------------
-    virtual float32 getDurationInSec () const;
+    virtual float64 getDurationInSec () const;
 
     //-------------------------------------------------------------------------
-    virtual uint32 getNumberSamples () const;
+    virtual size_t getNumberSamples () const;
 
     //-------------------------------------------------------------------------
-    virtual float32 getSampleRate () const;
+    virtual float64 getSampleRate () const;
 
 private:
     float32 sample_rate_;
Index: src/gui_impl/commands/adapt_event_view_gui_command.cpp
===================================================================
--- src/gui_impl/commands/adapt_event_view_gui_command.cpp	(revision 556)
+++ src/gui_impl/commands/adapt_event_view_gui_command.cpp	(working copy)
@@ -128,8 +128,8 @@
 
     QSharedPointer<SignalEvent const> event = events.first();
 
-    float32 width = currentVisModel()->view()->getViewportWidth();
-    float32 desired_pixel_per_sample = width / event->getDuration ();
+    float64 width = currentVisModel()->view()->getViewportWidth();
+    float64 desired_pixel_per_sample = width / event->getDuration ();
 
     currentSignalViewSettings()->setPixelsPerSample (desired_pixel_per_sample);
     currentVisModel()->goToSample (event->getPosition ());
Index: src/base/fixed_data_block.cpp
===================================================================
--- src/base/fixed_data_block.cpp	(revision 556)
+++ src/base/fixed_data_block.cpp	(working copy)
@@ -10,7 +10,7 @@
 
 //-------------------------------------------------------------------------------------------------
 FixedDataBlock::FixedDataBlock (QSharedPointer<QVector<float32> > data,
-                                float32 sample_rate_per_unit)
+                                float64 sample_rate_per_unit)
     : DataBlock (data->size(), sample_rate_per_unit),
       data_ (data),
       start_index_ (0)
@@ -135,7 +135,7 @@
 
     std::list<QSharedPointer<DataBlock const> >::const_iterator it = data_blocks.begin();
     QSharedPointer<QVector<float32> > mean (new QVector<float32>);
-    float32 sample_rate = (*it)->getSampleRatePerUnit ();
+    float64 sample_rate = (*it)->getSampleRatePerUnit ();
     float32 tmp_mean = 0;
     for (unsigned index = 0; index < (*(data_blocks.begin()))->size(); index++)
     {
@@ -174,7 +174,7 @@
         return QSharedPointer<DataBlock>(0);
 
     std::list<QSharedPointer<DataBlock const> >::const_iterator it = data_blocks.begin();
-    float32 sample_rate = (*it)->getSampleRatePerUnit ();
+    float64 sample_rate = (*it)->getSampleRatePerUnit ();
     float32 tmp_stddev = 0;
     for (unsigned index = 0; index < (*(data_blocks.begin()))->size(); index++)
     {
Index: src/base/signal_channel.cpp
===================================================================
--- src/base/signal_channel.cpp	(revision 556)
+++ src/base/signal_channel.cpp	(working copy)
@@ -4,7 +4,7 @@
     Copyright (C) Thomas Brunner  2006,2007 
     Copyright (C) Christoph Eibel 2007,2008, 
     Copyright (C) Clemens Brunner 2006,2007,2008  
-    Copyright (C) Alois Schloegl  2008,2009
+    Copyright (C) Alois Schloegl  2008,2009,2011
     This file is part of the "SigViewer" repository 
     at http://biosig.sf.net/ 
 
@@ -31,14 +31,60 @@
 {
 
 //-----------------------------------------------------------------------------
+SignalChannel::SignalChannel (unsigned ch,
+                              const HDRTYPE* hdr) :
+    number_ (ch),
+    label_ (QString(hdr->CHANNEL[ch].Label).trimmed()),
+    physical_maximum_(hdr->CHANNEL[ch].PhysMax), 	 
+    digital_maximum_(hdr->CHANNEL[ch].DigMax), 	 
+    physical_minimum_(hdr->CHANNEL[ch].PhysMin), 	 
+    digital_minimum_(hdr->CHANNEL[ch].DigMin), 	 
+    data_type_(hdr->CHANNEL[ch].GDFTYP), 	 
+    lowpass_(hdr->CHANNEL[ch].LowPass), 	 
+    highpass_(hdr->CHANNEL[ch].HighPass), 	 
+    notch_(hdr->CHANNEL[ch].Notch) 	 
+
+{
+/*
+     scale_ = (C.PhysMax - C.PhysMin) / (C.DigMax - C.DigMin); 	 
+     offset_ = C.PhysMin - C.DigMin * scale_; 	 
+*/
+     char p[MAX_LENGTH_PHYSDIM+1]; 	 
+     PhysDim(hdr->CHANNEL[ch].PhysDimCode,p); 	 
+     phys_y_dimension_label_ = QString(p);
+     samplerate_ = hdr->SampleRate * hdr->CHANNEL[ch].SPR / hdr->SPR; 
+}
+
 SignalChannel::SignalChannel (unsigned number,
-                              QString const& label,
-                              QString const& phys_y_dimension_label) :
+                              CHANNEL_STRUCT C) :
+
+    /* obsolete */                              
     number_ (number),
-    label_ (label),
-    phys_y_dimension_label_ (phys_y_dimension_label)
+    label_ (QString(C.Label).trimmed()),
+    physical_maximum_(C.PhysMax), 	 
+    digital_maximum_(C.DigMax), 	 
+    physical_minimum_(C.PhysMin), 	 
+    digital_minimum_(C.DigMin), 	 
+    data_type_(C.GDFTYP), 	 
+    lowpass_(C.LowPass), 	 
+    highpass_(C.HighPass), 	 
+    notch_(C.Notch) 	 
+
 {
+/*
+     scale_ = (C.PhysMax - C.PhysMin) / (C.DigMax - C.DigMin); 	 
+     offset_ = C.PhysMin - C.DigMin * scale_; 	 
+*/
+     char p[MAX_LENGTH_PHYSDIM+1]; 	 
+     PhysDim(C.PhysDimCode,p); 	 
+     phys_y_dimension_label_ = QString(p);
+     samplerate_ = -1.0; 
+}
 
+//-----------------------------------------------------------------------------
+float64 SignalChannel::getSampleRate() const
+{
+    return samplerate_;
 }
 
 //-----------------------------------------------------------------------------
Index: src/base/fixed_data_block.h
===================================================================
--- src/base/fixed_data_block.h	(revision 556)
+++ src/base/fixed_data_block.h	(working copy)
@@ -22,7 +22,7 @@
     /// @param sample_rate_per_unit as a data_block must not represent data which
     ///                             is associated to time, the sample_rate is given
     ///                             in "per unit" (e.g. "s" or "hz", etc.)
-    FixedDataBlock (QSharedPointer<QVector<float32> > data, float32 sample_rate_per_unit);
+    FixedDataBlock (QSharedPointer<QVector<float32> > data, float64 sample_rate_per_unit);
 
     //-------------------------------------------------------------------------
     virtual ~FixedDataBlock () {}
Index: src/base/math_utils.cpp
===================================================================
--- src/base/math_utils.cpp	(revision 556)
+++ src/base/math_utils.cpp	(working copy)
@@ -55,7 +55,7 @@
 }
 
 //-----------------------------------------------------------------------------
-int sampleRateToDecimalPrecision (float sample_rate)
+int sampleRateToDecimalPrecision (float64 sample_rate)
 {
     int precision = 0;
     for (; sample_rate > 10; sample_rate /= 10)
Index: src/base/signal_channel.h
===================================================================
--- src/base/signal_channel.h	(revision 556)
+++ src/base/signal_channel.h	(working copy)
@@ -4,7 +4,7 @@
     Copyright (C) Thomas Brunner  2006,2007 
     Copyright (C) Christoph Eibel 2007,2008, 
     Copyright (C) Clemens Brunner 2006,2007,2008  
-    Copyright (C) Alois Schloegl  2008,2009
+    Copyright (C) Alois Schloegl  2008,2009,2011
     This file is part of the "SigViewer" repository 
     at http://biosig.sf.net/ 
 
@@ -29,6 +29,7 @@
 #define SIGNAL_CHANNEL_H
 
 #include "sigviewer_user_types.h"
+#include "biosig.h"
 
 #include <QString>
 #include <QMutex>
@@ -43,9 +44,8 @@
 {
 public:
     //-------------------------------------------------------------------------
-    SignalChannel (unsigned number,
-                   QString const& label,
-                   QString const& phys_y_dimension_label = "");
+SignalChannel (unsigned ch, const HDRTYPE* hdr);
+SignalChannel (unsigned number, CHANNEL_STRUCT C);  /* obsolete, deprecated */
 
     //-------------------------------------------------------------------------
     QString typeString() const;
@@ -59,6 +59,7 @@
     float64 getDigitalMaximum() const;
     float64 getPhysicalMinimum() const;
     float64 getDigitalMinimum() const;
+    float64 getSampleRate() const; 
 
 private:
     // from GDF format
@@ -95,6 +96,7 @@
     uint16_t data_type_;
     float64 lowpass_;
     float64 highpass_;
+    float64 samplerate_;
     bool notch_;
 };
 
Index: src/base/math_utils.h
===================================================================
--- src/base/math_utils.h	(revision 556)
+++ src/base/math_utils.h	(working copy)
@@ -42,7 +42,7 @@
 
 //-----------------------------------------------------------------------------
 /// @return number of decimals needed to display time intervals correctly
-int sampleRateToDecimalPrecision (float sample_rate);
+int sampleRateToDecimalPrecision (float64 sample_rate);
 
 }
 
Index: src/base/signal_event.cpp
===================================================================
--- src/base/signal_event.cpp	(revision 556)
+++ src/base/signal_event.cpp	(working copy)
@@ -79,9 +79,9 @@
 }
 
 //-----------------------------------------------------------------------------
-float32 SignalEvent::getPositionInSec() const
+float64 SignalEvent::getPositionInSec() const
 {
-    return static_cast<float32>(position_) / sample_rate_;
+    return static_cast<float64>(position_) / sample_rate_;
 }
 
 
@@ -104,15 +104,15 @@
 }
 
 //-----------------------------------------------------------------------------
-float32 SignalEvent::getDurationInSec() const
+float64 SignalEvent::getDurationInSec() const
 {
-    return static_cast<float32>(duration_) / sample_rate_;
+    return static_cast<float64>(duration_) / sample_rate_;
 }
 
 //-----------------------------------------------------------------------------
-float32 SignalEvent::getEndInSec () const
+float64 SignalEvent::getEndInSec () const
 {
-    return (static_cast<float32>(duration_ + position_)) / sample_rate_;
+    return (static_cast<float64>(duration_ + position_)) / sample_rate_;
 }
 
 //-----------------------------------------------------------------------------
Index: src/base/data_block.cpp
===================================================================
--- src/base/data_block.cpp	(revision 556)
+++ src/base/data_block.cpp	(working copy)
@@ -12,7 +12,7 @@
 unsigned DataBlock::instance_count_ = 0;
 
 //-----------------------------------------------------------------------------
-DataBlock::DataBlock (unsigned length, float32 sample_rate_per_unit)
+DataBlock::DataBlock (unsigned length, float64 sample_rate_per_unit)
     : length_ (length),
       sample_rate_per_unit_ (sample_rate_per_unit)
 {
@@ -79,7 +79,7 @@
 }
 
 //-------------------------------------------------------------------------
-float32 DataBlock::getSampleRatePerUnit () const
+float64 DataBlock::getSampleRatePerUnit () const
 {
     return sample_rate_per_unit_;
 }
Index: src/base/signal_event.h
===================================================================
--- src/base/signal_event.h	(revision 556)
+++ src/base/signal_event.h	(working copy)
@@ -24,12 +24,12 @@
 
     int32 getId() const;
     uint32 getPosition() const;
-    float32 getPositionInSec() const;
+    float64 getPositionInSec() const;
     uint16 getType() const;
     ChannelID getChannel() const;
     uint32 getDuration() const;
-    float32 getDurationInSec() const;
-    float32 getEndInSec () const;
+    float64 getDurationInSec() const;
+    float64 getEndInSec () const;
     float64 getSampleRate () const;
 
     void setId (EventID id);
Index: src/base/data_block.h
===================================================================
--- src/base/data_block.h	(revision 556)
+++ src/base/data_block.h	(working copy)
@@ -59,16 +59,16 @@
     std::string getYUnitLabel () const;
 
     //-------------------------------------------------------------------------
-    float32 getSampleRatePerUnit () const;
+    float64 getSampleRatePerUnit () const;
 
 protected:
     // protected constructors here:
-    DataBlock (unsigned length, float32 sample_rate_per_unit);
+    DataBlock (unsigned length, float64 sample_rate_per_unit);
     DataBlock (DataBlock const& src, unsigned new_length);
 
 private:
     uint32 length_;
-    float32 sample_rate_per_unit_;
+    float64 sample_rate_per_unit_;
 
     std::string label_;
     std::string x_unit_label_;
Index: src/src.qrc
===================================================================
--- src/src.qrc	(revision 556)
+++ src/src.qrc	(working copy)
@@ -27,7 +27,6 @@
         <file>images/file_16x16.png</file>
         <file>images/info_16x16.png</file>
         <file>images/patient_16x16.png</file>
-        <file>eventcodes.txt</file>
         <file>images/zoom_in_vertical_22x22.png</file>
         <file>images/icons/fileclose.png</file>
         <file>images/icons/fileopen.png</file>
Index: deb_building_stuff/deb_control_template
===================================================================
--- deb_building_stuff/deb_control_template	(revision 556)
+++ deb_building_stuff/deb_control_template	(working copy)
@@ -7,5 +7,5 @@
 Replaces: sigviewer (<< <version>)
 Installed-Size: <bin-size-via-script>
 Maintainer: Christoph Eibel <christoph.eibel@tugraz.at>
-Homepage: http://sigviewer.sourceforge.net
+Homepage: http://biosig.sourceforge.net
 Description: SigViewer is a powerful viewing application for biosignals, originally designed to display electroencephalographic (EEG) data.