Skip to content
Commits on Source (3)
......@@ -95,7 +95,7 @@ openSUSE: sudo zypper install -t pattern devel_basis
# #
# This will not mess with your system libraries. The new compiled libraries will be stored #
# #
# in a new and separate directory: /usr/local/Qt-5.9.3 #
# in a new and separate directory: /usr/local/Qt-5.9.4 #
# #
# It will not interfere with other Qt programs. #
# #
......@@ -105,14 +105,14 @@ mkdir Qt5-source
cd Qt5-source
wget http://ftp1.nluug.nl/languages/qt/official_releases/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz
wget http://ftp1.nluug.nl/languages/qt/official_releases/qt/5.9/5.9.4/single/qt-everywhere-opensource-src-5.9.4.tar.xz
here is a list of download mirrors: https://download.qt.io/static/mirrorlist/
The Qt source package you are going to need is: qt-everywhere-opensource-src-5.9.3.tar.xz
The Qt source package you are going to need is: qt-everywhere-opensource-src-5.9.4.tar.xz
tar -xvf qt-everywhere-opensource-src-5.9.3.tar.xz
tar -xvf qt-everywhere-opensource-src-5.9.4.tar.xz
cd qt-everywhere-opensource-src-5.9.3
cd qt-everywhere-opensource-src-5.9.4
./configure -v -release -opensource -confirm-license -c++std c++11 -static -accessibility -fontconfig -skip qtdeclarative -skip qtconnectivity -skip qtmultimedia -no-qml-debug -qt-zlib -no-mtdev -no-journald -qt-libpng -qt-libjpeg -system-freetype -qt-harfbuzz -no-openssl -no-libproxy -no-glib -nomake examples -nomake tests -no-compile-examples -cups -no-evdev -no-dbus -no-eglfs -qreal double -no-opengl -skip qtlocation -skip qtsensors -skip qtwayland -skip qtgamepad -skip qtserialbus
......@@ -126,7 +126,7 @@ sudo make install
Now go to the directory that contains the EDFbrowser sourcecode and enter the following commands:
/usr/local/Qt-5.9.3/bin/qmake
/usr/local/Qt-5.9.4/bin/qmake
make -j8
......
......@@ -1662,7 +1662,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", "Separator must be one character or tab.");
messagewindow.exec();
return(1);
return 1;
}
if((str[0]<32)||(str[0]>126))
......@@ -1670,7 +1670,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", "Separator character is not a valid ASCII character.");
messagewindow.exec();
return(1);
return 1;
}
if(str[0]=='.')
......@@ -1678,7 +1678,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", "Separator character can not be a dot.");
messagewindow.exec();
return(1);
return 1;
}
if((str[0]>47)&&(str[0]<58))
......@@ -1686,7 +1686,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", "Separator character can not be a number.");
messagewindow.exec();
return(1);
return 1;
}
separator = str[0];
......@@ -1703,7 +1703,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", "Only samplefrequencies below 1 Hz can have a decimal fraction.");
messagewindow.exec();
return(1);
return 1;
}
}
......@@ -1733,7 +1733,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
for(k=0; k<len; k++)
......@@ -1747,7 +1747,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
if(str[k]==' ')
......@@ -1761,7 +1761,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
}
......@@ -1777,7 +1777,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
if((str[k]<48)||(str[k]>57))
......@@ -1794,7 +1794,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
else
{
......@@ -1808,7 +1808,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
dot = 1;
......@@ -1824,7 +1824,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
}
}
......@@ -1842,7 +1842,7 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", big_str);
messagewindow.exec();
return(1);
return 1;
}
}
}
......@@ -1862,10 +1862,10 @@ int UI_ASCII2EDFapp::check_input(void)
QMessageBox messagewindow(QMessageBox::Critical, "Invalid input", "At least one row needs to be checked.");
messagewindow.exec();
return(1);
return 1;
}
return(0);
return 0;
}
......
......@@ -66,12 +66,12 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
if(edfsignals < 1)
{
return(0);
return 0;
}
if(long_data_record_duration != TIME_DIMENSION)
{
return(0);
return 0;
}
sf = hdr->edfparam[0].smp_per_record;
......@@ -80,7 +80,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
{
if(hdr->edfparam[i].smp_per_record != sf)
{
return(0);
return 0;
}
}
......@@ -112,7 +112,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
if(error)
{
return(0);
return 0;
}
for(i=0; i<edfsignals; i++)
......@@ -127,7 +127,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
if(i == edfsignals)
{
return(0);
return 0;
}
bufsize = sf * 3;
......@@ -137,7 +137,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
{
QMessageBox messagewindow(QMessageBox::Critical, "Error", "Memory allocation error occurred when trying to read triggers.\n(buf)");
messagewindow.exec();
return(1);
return 1;
}
if(fseeko(inputfile, ((long long)edfsignals + 1LL) * 256LL, SEEK_SET))
......@@ -145,7 +145,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
QMessageBox messagewindow(QMessageBox::Critical, "Error", "An error occurred when reading inputfile triggers.");
messagewindow.exec();
free(buf);
return(2);
return 2;
}
jump_file = status_signal * sf * 3;
......@@ -194,7 +194,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
QMessageBox messagewindow(QMessageBox::Critical, "Error", "An error occurred when reading inputfile triggers.");
messagewindow.exec();
free(buf);
return(2);
return 2;
}
if(fread(buf, bufsize, 1, inputfile)!=1)
......@@ -203,7 +203,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
QMessageBox messagewindow(QMessageBox::Critical, "Error", "An error occurred when reading inputfile triggers.");
messagewindow.exec();
free(buf);
return(2);
return 2;
}
for(i=0; i<bufsize; i+=3)
......@@ -223,7 +223,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
QMessageBox messagewindow(QMessageBox::Critical, "Error", "Malloc error (annotation).");
messagewindow.exec();
free(buf);
return(1);
return 1;
}
trigger_cnt++;
......@@ -255,7 +255,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
QMessageBox messagewindow(QMessageBox::Critical, "Error", "Malloc error (annotation).");
messagewindow.exec();
free(buf);
return(1);
return 1;
}
trigger_cnt++;
......@@ -280,7 +280,7 @@ int BDF_triggers::get_triggers(struct edfhdrblock *hdr)
hdr->genuine_biosemi = 1;
return(0);
return 0;
}
......
This diff is collapsed.
......@@ -137,7 +137,7 @@ void Check_for_updates::replyFinished()
return;
}
QDesktopServices::openUrl(QUrl("http://www.teuniz.net/edfbrowser/"));
QDesktopServices::openUrl(QUrl("https://www.teuniz.net/edfbrowser/"));
}
......
edfbrowser (1.63+dfsg-1) unstable; urgency=medium
* New upstream version
-- Andreas Tille <tille@debian.org> Sun, 11 Mar 2018 08:39:12 +0100
edfbrowser (1.62+dfsg-1) unstable; urgency=medium
* New usptream version
......
......@@ -7,7 +7,7 @@
<meta name="description" content="EDFbrowser manual">
</head><body>
<h1>EDFbrowser 1.62 manual</h1>
<h1>EDFbrowser 1.63 manual</h1>
<p><br></p>
......@@ -929,21 +929,36 @@
<h3><a name="Import_annotations">Import annotations/events</a></h3>
<p>
This tool imports annotations/events. The inputfile can be ASCII (CSV), XML, EDF+ or BDF+.<br>
This tool imports annotations/events. The inputfile can be ASCII (CSV), XML, EDF+, BDF+ or MIT/WFDB format.<br>
It's also possible to use a triggersignal in a DC-coupled channel/signal.<br>
</p>
<p>
Note: You have to open an EDF/BDF file first in order to be able to import annotations/events.<br>
</p>
<h4>ASCII</h4>
<p>
An ASCII-file must be organised in rows and columns.<br>
The decimal separator of numbers must be a dot.<br>
Grouping characters like the comma in for example "12,345.678" are not allowed.<br>
The example must be written as "12345.678".<br>
Line endings must use the "newline" or "linefeed" character (Unix style)<br>
In the import dialog, set the separator character (the character that separates the columns),<br>
for example: "tab" (tabulator) or "," (comma).<br>
Also, set the columnnumber of the onsettime and the description/label.<br>
If the file starts with a header, adjust the "Data starts at line" spinbox<br>
in order to skip these lines.<br>
for example: "tab" (tabulator),"," (comma) or ";"(semicolon).<br>
Set the column number of the onset time and the description/label.<br>
If the file starts with a header, adjust the "Data starts at line" spinbox in order to skip these lines.<br>
If there's only one column in the ascii/txt file (with onset time values), check the<br>
"Manual description" button and enter a description. This description will be used for all<br>
annotations that will be imported from that ascii/txt file.
annotations that will be imported from that ascii/txt file.<br>
<br>
The onset time encoding can be expressed as:
</p>
<ul>
<li>relative from start of file and expressed in seconds</li>
<li>clock time: hh:mm:ss</li>
<li>clock time: hh:mm:ss.xxx</li>
<li>date time: yyyy-mm-ddThh:mm:ss</li>
<li>date time: yyyy-mm-ddThh:mm:ss.xxx</li>
</ul>
<h4>XML</h4>
<p>
XML-files need to be encoded either in ISO-8859-1 or UTF-8 character encoding.<br>
......@@ -952,6 +967,7 @@
Onset is expressed in the ISO date-time format "yyyy-mm-ddThh:mm:ss" or "yyyy-mm-ddThh:mm:ss.xxx".<br>
Duration is expressed in seconds "145.23" or empty.<br>
Example:<br>
</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;annotationlist&gt;
......@@ -972,8 +988,12 @@
&lt;/annotation&gt;
&lt;/annotationlist&gt;
</pre>
<h4>MIT/WFDB</h4>
<p>
Note: You have to open an EDF/BDF file first in order to be able to import annotations/events.<br>
The onset time of the annotations in MIT/WFDB format are expressed in samples offset from the start of the recording.<br>
In case your file contains signals with different samplerates, you need to specify which samplerate should be used to<br>
calculate the onset time of the annotations.<br>
MIT/WFDB annotation files can have various extensions like *.ari *.ecg *.trigger *.qrs *.atr *.apn *.st *.pwave<br>
</p>
<h4>DC-events / DC-triggers</h4>
<p>
......@@ -983,6 +1003,7 @@
The startbit has always a high level and the stopbit has always a lowlevel.<br>
At idle the signal should stay at low level.<br>
The following example shows a dc-event with decimal code 170:<br>
</p>
<pre>
onsettime of the event
| bittime
......
......@@ -49,12 +49,12 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
struct ecg_filter_settings *settings;
if(sf < 99.9) return(NULL);
if(sf < 99.9) return NULL;
if((powerlinefreq != 50) && (powerlinefreq != 60)) return(NULL);
if((powerlinefreq != 50) && (powerlinefreq != 60)) return NULL;
settings = (struct ecg_filter_settings *) calloc(1, sizeof(struct ecg_filter_settings));
if(settings==NULL) return(NULL);
if(settings==NULL) return NULL;
d_tmp = sf / (double)powerlinefreq;
settings->avgfilter_50_size = d_tmp;
......@@ -77,7 +77,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
{
free(settings);
return(NULL);
return NULL;
}
settings->avgfilter_50_buf_bu = (double *)calloc(1, settings->avgfilter_50_size * sizeof(double));
if(settings->avgfilter_50_buf_bu == NULL)
......@@ -85,7 +85,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->avgfilter_50_buf);
free(settings);
return(NULL);
return NULL;
}
settings->avgfilter_35_buf = (double *)calloc(1, settings->avgfilter_35_size * sizeof(double));
if(settings->avgfilter_35_buf == NULL)
......@@ -94,7 +94,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->avgfilter_50_buf_bu);
free(settings);
return(NULL);
return NULL;
}
settings->avgfilter_35_buf_bu = (double *)calloc(1, settings->avgfilter_35_size * sizeof(double));
if(settings->avgfilter_35_buf_bu == NULL)
......@@ -104,7 +104,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->avgfilter_35_buf);
free(settings);
return(NULL);
return NULL;
}
settings->avgfilter_25_buf = (double *)calloc(1, settings->avgfilter_25_size * sizeof(double));
if(settings->avgfilter_25_buf == NULL)
......@@ -115,7 +115,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->avgfilter_35_buf_bu);
free(settings);
return(NULL);
return NULL;
}
settings->avgfilter_25_buf_bu = (double *)calloc(1, settings->avgfilter_25_size * sizeof(double));
if(settings->avgfilter_25_buf_bu == NULL)
......@@ -127,7 +127,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->avgfilter_25_buf);
free(settings);
return(NULL);
return NULL;
}
settings->SV_idx = 0;
......@@ -147,7 +147,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->avgfilter_25_buf_bu);
free(settings);
return(NULL);
return NULL;
}
settings->M_startslope = sf * 0.2;
......@@ -184,7 +184,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->SV);
free(settings);
return(NULL);
return NULL;
}
settings->F_bu = (double *)calloc(1, settings->F_size * sizeof(double));
if(settings->F_bu == NULL)
......@@ -198,7 +198,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->F);
free(settings);
return(NULL);
return NULL;
}
for(i=0; i<5; i++)
......@@ -236,7 +236,7 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->F_bu);
free(settings);
return(NULL);
return NULL;
}
settings->stat_smpl_buf = (long long *)malloc(sizeof(long long) * ECG_FILTER_STAT_BUFSIZE);
......@@ -253,10 +253,10 @@ struct ecg_filter_settings * create_ecg_filter(double sf, double bitval, int pow
free(settings->stat_buf);
free(settings);
return(NULL);
return NULL;
}
return(settings);
return settings;
}
......@@ -330,9 +330,9 @@ double run_ecg_filter(double new_sample, struct ecg_filter_settings *settings)
settings->avgfilter_25_mean /= settings->avgfilter_25_size;
// return(settings->avgfilter_25_mean); // debug
// return settings->avgfilter_25_mean; // debug
// if(signalcompnr == 1) return(settings->avgfilter_25_mean); // debug
// if(signalcompnr == 1) return settings->avgfilter_25_mean; // debug
/* spatial velocity filter */
......@@ -344,9 +344,9 @@ double run_ecg_filter(double new_sample, struct ecg_filter_settings *settings)
if(new_input < 0.0) new_input *= -1.0;
// return(new_input); // debug
// return new_input; // debug
// if(signalcompnr == 2) return(new_input); // debug
// if(signalcompnr == 2) return new_input; // debug
settings->F[settings->F_idx++] = new_input;
settings->F_idx %= settings->F_size;
......@@ -377,7 +377,7 @@ double run_ecg_filter(double new_sample, struct ecg_filter_settings *settings)
settings->F_value += (result / settings->F_sf_factor);
// return(settings->F_value); // debug
// return settings->F_value; // debug
////////////////////////////////////////////////
......@@ -429,13 +429,13 @@ double run_ecg_filter(double new_sample, struct ecg_filter_settings *settings)
settings->sample_cntr++;
// if(signalcompnr == 6) return(settings->M_avg + settings->R_value); // debug: check ecg detection treshold
// if(signalcompnr == 3) return(settings->M_avg); // debug: check ecg detection treshold
// if(signalcompnr == 4) return(settings->F_value); // debug: check ecg detection treshold
// if(signalcompnr == 5) return(settings->R_value); // debug: check ecg detection treshold
// if(signalcompnr == 7) return(settings->T_peak_avg / 2.0); // debug: check ecg detection treshold
// if(signalcompnr == 6) return settings->M_avg + settings->R_value; // debug: check ecg detection treshold
// if(signalcompnr == 3) return settings->M_avg; // debug: check ecg detection treshold
// if(signalcompnr == 4) return settings->F_value; // debug: check ecg detection treshold
// if(signalcompnr == 5) return settings->R_value; // debug: check ecg detection treshold
// if(signalcompnr == 7) return settings->T_peak_avg / 2.0; // debug: check ecg detection treshold
return(settings->bpm / settings->bitvalue);
return settings->bpm / settings->bitvalue;
}
if(new_input > settings->T_peak_avg)
......@@ -558,14 +558,14 @@ double run_ecg_filter(double new_sample, struct ecg_filter_settings *settings)
}
}
// if(signalcompnr == 6) return(settings->M_avg + settings->F_value + settings->R_value); // debug: check ecg detection treshold
// if(signalcompnr == 6) return(settings->M_avg + settings->R_value); // debug: check ecg detection treshold
// if(signalcompnr == 3) return(settings->M_avg); // debug: check ecg detection treshold
// if(signalcompnr == 4) return(settings->F_value); // debug: check ecg detection treshold
// if(signalcompnr == 5) return(settings->R_value); // debug: check ecg detection treshold
// if(signalcompnr == 7) return(settings->T_peak_avg / 2.0); // debug: check ecg detection treshold
// if(signalcompnr == 6) return settings->M_avg + settings->F_value + settings->R_value; // debug: check ecg detection treshold
// if(signalcompnr == 6) return settings->M_avg + settings->R_value; // debug: check ecg detection treshold
// if(signalcompnr == 3) return settings->M_avg; // debug: check ecg detection treshold
// if(signalcompnr == 4) return settings->F_value; // debug: check ecg detection treshold
// if(signalcompnr == 5) return settings->R_value; // debug: check ecg detection treshold
// if(signalcompnr == 7) return settings->T_peak_avg / 2.0; // debug: check ecg detection treshold
return(settings->bpm / settings->bitvalue);
return settings->bpm / settings->bitvalue;
}
......@@ -753,19 +753,19 @@ void free_ecg_filter(struct ecg_filter_settings *settings)
int ecg_filter_get_beat_cnt(struct ecg_filter_settings *settings)
{
return(settings->stat_buf_idx);
return settings->stat_buf_idx;
}
long long * ecg_filter_get_onset_beatlist(struct ecg_filter_settings *settings)
{
return(settings->stat_smpl_buf);
return settings->stat_smpl_buf;
}
double * ecg_filter_get_interval_beatlist(struct ecg_filter_settings *settings)
{
return(settings->stat_buf);
return settings->stat_buf;
}
......
......@@ -98,7 +98,7 @@ int edfplus_annotation_size(struct annotation_list *list)
{
if(list == NULL) return 0;
return(list->sz);
return list->sz;
}
......@@ -497,7 +497,7 @@ int edfplus_annotation_get_max_annotation_strlen(struct annotation_list *list)
// timestamp_digits,
// timestamp_decimals);
return(annot_descr_len + annot_duration_len + timestamp_digits + timestamp_decimals + 4);
return annot_descr_len + annot_duration_len + timestamp_digits + timestamp_decimals + 4;
}
......@@ -555,7 +555,7 @@ long long edfplus_annotation_get_long_from_number(const char *str)
if(str[-1]=='-') value = -value;
return(value);
return value;
}
......
......@@ -187,7 +187,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
{
QMessageBox messagewindow(QMessageBox::Critical, "Error", "Memory allocation error occurred when trying to read annotations.\n(cnv_buf)");
messagewindow.exec();
return(1);
return 1;
}
max_tal_ln = 0;
......@@ -205,7 +205,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
QMessageBox messagewindow(QMessageBox::Critical, "Error", "Memory allocation error occurred when trying to read annotations.\n(scratchpad)");
messagewindow.exec();
free(cnv_buf);
return(1);
return 1;
}
time_in_txt = (char *)calloc(1, max_tal_ln + 3);
......@@ -215,7 +215,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
messagewindow.exec();
free(cnv_buf);
free(scratchpad);
return(1);
return 1;
}
duration_in_txt = (char *)calloc(1, max_tal_ln + 3);
......@@ -226,7 +226,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(cnv_buf);
free(scratchpad);
free(time_in_txt);
return(1);
return 1;
}
if(fseeko(inputfile, (long long)((edfsignals + 1) * 256), SEEK_SET))
......@@ -237,7 +237,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(scratchpad);
free(time_in_txt);
free(duration_in_txt);
return(2);
return 2;
}
QProgressDialog progress("Scanning file for annotations...", "Abort", 0, datarecords);
......@@ -268,7 +268,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(scratchpad);
free(time_in_txt);
free(duration_in_txt);
return(11);
return 11;
}
}
......@@ -281,7 +281,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(scratchpad);
free(time_in_txt);
free(duration_in_txt);
return(2);
return 2;
}
......@@ -451,7 +451,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(scratchpad);
free(time_in_txt);
free(duration_in_txt);
return(1);
return 1;
}
}
}
......@@ -520,7 +520,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(scratchpad);
free(time_in_txt);
free(duration_in_txt);
return(9);
return 9;
}
}
......@@ -560,7 +560,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(scratchpad);
free(time_in_txt);
free(duration_in_txt);
return(1);
return 1;
}
}
}
......@@ -588,7 +588,7 @@ int EDF_annotations::get_annotations(struct edfhdrblock *edf_hdr, int read_nk_tr
free(time_in_txt);
free(duration_in_txt);
return(0);
return 0;
}
......@@ -598,24 +598,24 @@ int EDF_annotations::is_duration_number(char *str)
l = strlen(str);
if(!l) return(1);
if(!l) return 1;
if((str[0] == '.')||(str[l-1] == '.')) return(1);
if((str[0] == '.')||(str[l-1] == '.')) return 1;
for(i=0; i<l; i++)
{
if(str[i]=='.')
{
if(hasdot) return(1);
if(hasdot) return 1;
hasdot++;
}
else
{
if((str[i]<48)||(str[i]>57)) return(1);
if((str[i]<48)||(str[i]>57)) return 1;
}
}
return(0);
return 0;
}
......@@ -626,26 +626,26 @@ int EDF_annotations::is_onset_number(char *str)
l = strlen(str);
if(l<2) return(1);
if(l<2) return 1;
if((str[0]!='+')&&(str[0]!='-')) return(1);
if((str[0]!='+')&&(str[0]!='-')) return 1;
if((str[1] == '.')||(str[l-1] == '.')) return(1);
if((str[1] == '.')||(str[l-1] == '.')) return 1;
for(i=1; i<l; i++)
{
if(str[i]=='.')
{
if(hasdot) return(1);
if(hasdot) return 1;
hasdot++;
}
else
{
if((str[i]<48)||(str[i]>57)) return(1);
if((str[i]<48)||(str[i]>57)) return 1;
}
}
return(0);
return 0;
}
......@@ -709,7 +709,7 @@ long long EDF_annotations::get_long_time(char *str)
if(neg) value = -value;
return(value);
return value;
}
......@@ -717,7 +717,7 @@ int EDF_annotations::check_device(char *str)
{
int error = 1;
if(strlen(str) < 29) return(1);
if(strlen(str) < 29) return 1;
if(!strncmp(str, "Nihon Kohden EEG-1100A V01.00", 29)) error = 0;
if(!strncmp(str, "Nihon Kohden EEG-1100B V01.00", 29)) error = 0;
......@@ -730,7 +730,7 @@ int EDF_annotations::check_device(char *str)
if(!strncmp(str, "Nihon Kohden DAE-2100D V02.00", 29)) error = 0;
// if(!strncmp(str, "Nihon Kohden EEG-1200A V01.00", 29)) error = 0;
return(error);
return error;
}
......
......@@ -626,24 +626,24 @@ int UI_EDFCompatwindow::is_duration_number(char *str)
l = strlen(str);
if(!l) return(1);
if(!l) return 1;
if((str[0] == '.')||(str[l-1] == '.')) return(1);
if((str[0] == '.')||(str[l-1] == '.')) return 1;
for(i=0; i<l; i++)
{
if(str[i]=='.')
{
if(hasdot) return(1);
if(hasdot) return 1;
hasdot++;
}
else
{
if((str[i]<48)||(str[i]>57)) return(1);
if((str[i]<48)||(str[i]>57)) return 1;
}
}
return(0);
return 0;
}
......@@ -654,26 +654,26 @@ int UI_EDFCompatwindow::is_onset_number(char *str)
l = strlen(str);
if(l<2) return(1);
if(l<2) return 1;
if((str[0]!='+')&&(str[0]!='-')) return(1);
if((str[0]!='+')&&(str[0]!='-')) return 1;
if((str[1] == '.')||(str[l-1] == '.')) return(1);
if((str[1] == '.')||(str[l-1] == '.')) return 1;
for(i=1; i<l; i++)
{
if(str[i]=='.')
{
if(hasdot) return(1);
if(hasdot) return 1;
hasdot++;
}
else
{
if((str[i]<48)||(str[i]>57)) return(1);
if((str[i]<48)||(str[i]>57)) return 1;
}
}
return(0);
return 0;
}
......@@ -684,7 +684,7 @@ int UI_EDFCompatwindow::is_integer_number(char *str)
l = strlen(str);
if(!l) return(1);
if(!l) return 1;
if((str[0]=='+')||(str[0]=='-'))
{
......@@ -698,7 +698,7 @@ int UI_EDFCompatwindow::is_integer_number(char *str)
{
if(!digit)
{
return(1);
return 1;
}
hasspace++;
}
......@@ -706,21 +706,21 @@ int UI_EDFCompatwindow::is_integer_number(char *str)
{
if((str[i]<48)||(str[i]>57))
{
return(1);
return 1;
}
else
{
if(hasspace)
{
return(1);
return 1;
}
digit++;
}
}
}
if(digit) return(0);
else return(1);
if(digit) return 0;
else return 1;
}
......@@ -731,7 +731,7 @@ int UI_EDFCompatwindow::is_number(char *str)
l = strlen(str);
if(!l) return(1);
if(!l) return 1;
if((str[0]=='+')||(str[0]=='-'))
{
......@@ -741,7 +741,7 @@ int UI_EDFCompatwindow::is_number(char *str)
if(str[l-1]=='.')
{
return(1);
return 1;
}
for(; i<l; i++)
......@@ -750,11 +750,11 @@ int UI_EDFCompatwindow::is_number(char *str)
{
if(!digit)
{
return(1);
return 1;
}
if(str[i-1]=='.')
{
return(1);
return 1;
}
hasspace++;
}
......@@ -762,18 +762,18 @@ int UI_EDFCompatwindow::is_number(char *str)
{
if(((str[i]<48)||(str[i]>57))&&str[i]!='.')
{
return(1);
return 1;
}
else
{
if(hasspace)
{
return(1);
return 1;
}
if(str[i]=='.')
{
if(hasdot||!i) return(1);
if(hassign&&(i<2)) return(1);
if(hasdot||!i) return 1;
if(hassign&&(i<2)) return 1;
hasdot++;
}
else
......@@ -784,8 +784,8 @@ int UI_EDFCompatwindow::is_number(char *str)
}
}
if(digit) return(0);
else return(1);
if(digit) return 0;
else return 1;
}
......
......@@ -42,7 +42,7 @@ int edfplus_annotation_get_tal_timestamp_digit_cnt(struct edfhdrblock *hdr)
if(hdr==NULL)
{
return(-1);
return -1;
}
time = (hdr->datarecords * hdr->long_data_record_duration) / TIME_DIMENSION;
......@@ -53,7 +53,7 @@ int edfplus_annotation_get_tal_timestamp_digit_cnt(struct edfhdrblock *hdr)
timestamp_digits = snprintf(scratchpad, 256, "%lli", time);
#endif
return(timestamp_digits);
return timestamp_digits;
}
......@@ -65,7 +65,7 @@ int edfplus_annotation_get_tal_timestamp_decimal_cnt(struct edfhdrblock *hdr)
if(hdr==NULL)
{
return(-1);
return -1;
}
j = 10;
......@@ -100,7 +100,7 @@ int edfplus_annotation_get_tal_timestamp_decimal_cnt(struct edfhdrblock *hdr)
}
}
return(timestamp_decimals);
return timestamp_decimals;
}
......
......@@ -105,6 +105,7 @@ HEADERS += import_annotations.h
HEADERS += ravg_filter.h
HEADERS += wav2edf.h
HEADERS += fma_ecg2edf.h
HEADERS += mortara2edf.h
HEADERS += averager_dialog.h
HEADERS += averager_curve_wnd.h
HEADERS += ecg_filter.h
......@@ -199,6 +200,7 @@ SOURCES += import_annotations.cpp
SOURCES += ravg_filter.cpp
SOURCES += wav2edf.cpp
SOURCES += fma_ecg2edf.cpp
SOURCES += mortara2edf.cpp
SOURCES += averager_dialog.cpp
SOURCES += averager_curve_wnd.cpp
SOURCES += ecg_filter.cpp
......
......@@ -746,7 +746,7 @@ long long UI_EDFDwindow::get_datarecord_timestamp(char *str)
value = -value;
}
return(value);
return value;
}
......
......@@ -981,7 +981,7 @@ int UI_EMSA2EDFwindow::get_string(char *str, FILE *file, int offset, int maxlen)
{
str[0] = 0;
return(0);
return 0;
}
fseeko(file, (long long)(offset), SEEK_SET);
......@@ -992,7 +992,7 @@ int UI_EMSA2EDFwindow::get_string(char *str, FILE *file, int offset, int maxlen)
{
str[0] = 0;
return(0);
return 0;
}
if(len>maxlen)
......@@ -1004,12 +1004,12 @@ int UI_EMSA2EDFwindow::get_string(char *str, FILE *file, int offset, int maxlen)
{
str[0] = 0;
return(0);
return 0;
}
str[len] = 0;
return(len);
return len;
}
......
......@@ -37,7 +37,7 @@ struct filter_settings * create_filter(int is_LPF, double cutoff_frequency, doub
struct filter_settings *settings;
settings = (struct filter_settings *) calloc(1, sizeof(struct filter_settings));
if(settings==NULL) return(NULL);
if(settings==NULL) return NULL;
settings->is_LPF = is_LPF;
settings->cutoff_frequency = cutoff_frequency;
......@@ -47,7 +47,7 @@ struct filter_settings * create_filter(int is_LPF, double cutoff_frequency, doub
settings->old_output = 0.0;
settings->first_sample = 1;
return(settings);
return settings;
}
......@@ -58,11 +58,11 @@ struct filter_settings * create_filter_copy(struct filter_settings *src)
settings = (struct filter_settings *)calloc(1, sizeof(struct filter_settings));
if(settings==NULL)
{
return(NULL);
return NULL;
}
memcpy(settings, src, sizeof(struct filter_settings));
return(settings);
return settings;
}
......@@ -96,13 +96,13 @@ int first_order_filter(int new_input, struct filter_settings *settings)
{
settings->old_output = new_input;
return(new_input);
return new_input;
}
else
{
settings->old_output = 0.0;
return(0);
return 0;
}
}
......@@ -119,7 +119,7 @@ int first_order_filter(int new_input, struct filter_settings *settings)
settings->old_input = new_input;
settings->old_output = new_output;
return((int)new_output);
return (int)new_output;
}
......@@ -132,7 +132,7 @@ double get_filter_factor(double cutoff_frequency, double sample_frequency)
t = 1.0 - t; // now t will be in the range 0.001 (at high sample-frequency and low cut-off)
// to 0.999 (at low sample-frequency and high cut-off)
return(t);
return t;
}
......
......@@ -50,6 +50,21 @@ FilterCurve::FilterCurve(QWidget *w_parent) : QWidget(w_parent)
marker_1 = 0;
marker_2 = 0;
filtcurve_font = new QFont;
#ifdef Q_OS_WIN32
filtcurve_font->setFamily("Tahoma");
filtcurve_font->setPixelSize(11);
#else
filtcurve_font->setFamily("Arial");
filtcurve_font->setPixelSize(12);
#endif
}
FilterCurve::~FilterCurve()
{
delete filtcurve_font;
}
......@@ -193,7 +208,7 @@ void FilterCurve::paintEvent(QPaintEvent *)
/////////////////////////////////// draw the markers ///////////////////////////////////////////
painter.setFont(QFont("Arial", 8));
painter.setFont(*filtcurve_font);
if((marker_1) || (marker_2))
{
......
......@@ -45,6 +45,7 @@ class FilterCurve: public QWidget
public:
FilterCurve(QWidget *parent=0);
~FilterCurve();
QSize sizeHint() const {return minimumSizeHint(); }
QSize minimumSizeHint() const {return QSize(30,10); }
......@@ -73,6 +74,8 @@ private:
RasterColor,
MarkerColor;
QFont *filtcurve_font;
double max_value1,
min_value1,
*buf1,
......
......@@ -38,7 +38,7 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
datarecord_cnt = -1;
total_samples = -1;
return(NULL);
return NULL;
}
signalcomp = i_signalcomp;
......@@ -48,7 +48,7 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
datarecord_cnt = -1;
total_samples = -1;
return(NULL);
return NULL;
}
inputfile = hdr->file_hdl;
......@@ -57,7 +57,7 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
datarecord_cnt = -1;
total_samples = -1;
return(NULL);
return NULL;
}
datarecord_cnt = i_datarecord_cnt;
......@@ -67,7 +67,7 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
datarecord_cnt = -1;
total_samples = -1;
return(NULL);
return NULL;
}
samples_per_datrec = hdr->edfparam[signalcomp->edfsignal[0]].smp_per_record;
......@@ -84,7 +84,7 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
datarecord_cnt = -1;
total_samples = -1;
return(NULL);
return NULL;
}
if(readbuf != NULL)
......@@ -99,18 +99,18 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
free(processed_samples_buf);
processed_samples_buf = NULL;
return(NULL);
return NULL;
}
bitvalue = signalcomp->edfhdr->edfparam[signalcomp->edfsignal[0]].bitvalue;
return(processed_samples_buf);
return processed_samples_buf;
}
int FilteredBlockReadClass::samples_in_buf(void)
{
return(total_samples);
return total_samples;
}
......@@ -160,32 +160,32 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_start)
if((total_samples < 1) || (datarecord_cnt < 1))
{
return(-1);
return -1;
}
if((datarecord_start < 0) || (datarecord_start >= hdr->datarecords))
{
return(-2);
return -2;
}
if(datarecord_cnt > (hdr->datarecords - datarecord_start))
{
return(-3);
return -3;
}
if(fseeko(inputfile, ((long long)hdr->hdrsize) + (((long long)datarecord_start) * ((long long) hdr->recordsize)), SEEK_SET) == -1LL)
{
return(-4);
return -4;
}
if(fread(readbuf, hdr->recordsize * datarecord_cnt, 1, inputfile) != 1)
{
return(-5);
return -5;
}
if((readbuf == NULL) || (processed_samples_buf == NULL))
{
return(-6);
return -6;
}
for(s=0; s<total_samples; s++)
......@@ -267,12 +267,14 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_start)
{
dig_value = run_ecg_filter(dig_value, signalcomp->ecg_filter);
}
dig_value *= signalcomp->polarity;
}
processed_samples_buf[s] = (dig_value * bitvalue);
}
return(0);
return 0;
}
......
......@@ -44,7 +44,7 @@
#endif
#define PROGRAM_NAME "EDFbrowser"
#define PROGRAM_VERSION "1.62"
#define PROGRAM_VERSION "1.63"
#define MINIMUM_QT4_VERSION 0x040701
#define MINIMUM_QT5_VERSION 0x050901
#define MAXFILES 32
......