Tree @upstream/1.88+dfsg (Download .tar.gz)
- doc
- images
- install
- third_party
- about_dialog.cpp
- about_dialog.h
- active_file_chooser.cpp
- active_file_chooser.h
- adjustfiltersettings.cpp
- adjustfiltersettings.h
- amplitude_dialog.cpp
- amplitude_dialog.h
- annotations_dock.cpp
- annotations_dock.h
- annotlist_filter_dialog.cpp
- annotlist_filter_dialog.h
- ascii2edf.cpp
- ascii2edf.h
- ascii_export.cpp
- ascii_export.h
- averager_curve_wnd.cpp
- averager_curve_wnd.h
- averager_dialog.cpp
- averager_dialog.h
- banned.h
- bdf2edf.cpp
- bdf2edf.h
- bdf_triggers.cpp
- bdf_triggers.h
- bi9800.cpp
- bi9800.h
- biosemi2bdfplus.cpp
- biosemi2bdfplus.h
- biox2edf.cpp
- biox2edf.h
- cdsa_dialog.cpp
- cdsa_dialog.h
- cdsa_dock.cpp
- cdsa_dock.h
- check_edf_file.cpp
- check_edf_file.h
- check_for_updates.cpp
- check_for_updates.h
- colordialog.cpp
- colordialog.h
- date_time_stamp_parser.c
- date_time_stamp_parser.h
- DISCLAIMER
- ecg_export.cpp
- ecg_export.h
- ecg_filter.c
- ecg_filter.h
- ecg_statistics.c
- ecg_statistics.h
- edf_annot_list.c
- edf_annot_list.h
- edf_annotations.cpp
- edf_annotations.h
- edf_compat.cpp
- edf_compat.h
- edf_helper.c
- edf_helper.h
- edfbrowser.pro
- edfbrowser.rc
- edfplusd_cnv.cpp
- edfplusd_cnv.h
- edit_annotation_dock.cpp
- edit_annotation_dock.h
- edit_predefined_mtg.cpp
- edit_predefined_mtg.h
- emsa2edf.cpp
- emsa2edf.h
- export_annotations.cpp
- export_annotations.h
- export_filtered_signals.cpp
- export_filtered_signals.h
- fft_wrap.c
- fft_wrap.h
- filter.c
- filter.h
- filter_dialog.cpp
- filter_dialog.h
- filtercurve.cpp
- filtercurve.h
- filteredblockread.cpp
- filteredblockread.h
- fino2edf.cpp
- fino2edf.h
- fir_filter.c
- fir_filter.h
- fir_filter_dialog.cpp
- fir_filter_dialog.h
- flywheel.cpp
- flywheel.h
- fma_ecg2edf.cpp
- fma_ecg2edf.h
- global.h
- gpl.txt
- header_editor.cpp
- header_editor.h
- hrv_dock.cpp
- hrv_dock.h
- hypnogram_dialog.cpp
- hypnogram_dialog.h
- hypnogram_dock.cpp
- hypnogram_dock.h
- images.qrc
- import_annotations.cpp
- import_annotations.h
- ishne2edf.cpp
- ishne2edf.h
- jump_dialog.cpp
- jump_dialog.h
- LICENSE
- load_montage_dialog.cpp
- load_montage_dialog.h
- main.cpp
- mainwindow.cpp
- mainwindow.h
- mainwindow_constr.cpp
- manscan2edf.cpp
- manscan2edf.h
- mit2edf.cpp
- mit2edf.h
- mortara2edf.cpp
- mortara2edf.h
- nexfin2edf.cpp
- nexfin2edf.h
- nk2edf.cpp
- nk2edf.h
- options_dialog.cpp
- options_dialog.h
- pagetime_dialog.cpp
- pagetime_dialog.h
- plif_ecg_subtract_filter.c
- plif_ecg_subtract_filter.h
- plif_ecg_subtract_filter_dialog.cpp
- plif_ecg_subtract_filter_dialog.h
- print_to_bdf.cpp
- print_to_bdf.h
- print_to_edf.cpp
- print_to_edf.h
- pt_qrs.c
- pt_qrs.h
- qt_headers.h
- ravg_filter.c
- ravg_filter.h
- raw2edf.cpp
- raw2edf.h
- read_write_settings.cpp
- README
- reduce_signals.cpp
- reduce_signals.h
- rename_annots_dialog.cpp
- rename_annots_dialog.h
- run_qrs_detector.cpp
- run_qrs_detector.h
- save_annots.cpp
- save_annots.h
- save_montage_dialog.cpp
- save_montage_dialog.h
- scp_ecg2edf.cpp
- scp_ecg2edf.h
- show_actual_montage_dialog.cpp
- show_actual_montage_dialog.h
- show_edf_hdr.cpp
- show_edf_hdr.h
- signal_chooser.cpp
- signal_chooser.h
- signalcurve.cpp
- signalcurve.h
- signals_dialog.cpp
- signals_dialog.h
- special_button.cpp
- special_button.h
- spectrum_dock.cpp
- spectrum_dock.h
- spectrumanalyzer.cpp
- spectrumanalyzer.h
- spike_filter.c
- spike_filter.h
- spike_filter_dialog.cpp
- spike_filter_dialog.h
- statistics_dialog.cpp
- statistics_dialog.h
- unify_resolution.cpp
- unify_resolution.h
- unisens2edf.cpp
- unisens2edf.h
- utc_date_time.c
- utc_date_time.h
- utils.c
- utils.h
- version.txt
- videoplayer.cpp
- view_montage_dialog.cpp
- view_montage_dialog.h
- viewbuf.cpp
- viewcurve.cpp
- viewcurve.h
- wav2edf.cpp
- wav2edf.h
- xml.c
- xml.h
- z_ratio_filter.c
- z_ratio_filter.h
- z_score_dialog.cpp
- z_score_dialog.h
edf_helper.c @upstream/1.88+dfsg — raw · history · blame
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 | /* *************************************************************************** * * Author: Teunis van Beelen * * Copyright (C) 2010 - 2021 Teunis van Beelen * * Email: teuniz@protonmail.com * *************************************************************************** * * 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, version 3 of the License. * * 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 "edf_helper.h" static const char edf_label_types[7][32]= { "EEG ", "ECG ", "EOG ", "ERG ", "EMG ", "MEG ", "MCG " }; int edfplus_annotation_get_tal_timestamp_digit_cnt(struct edfhdrblock *hdr) { int timestamp_digits; char scratchpad[256]; long long time; if(hdr==NULL) { return -1; } time = (hdr->datarecords * hdr->long_data_record_duration) / TIME_DIMENSION; #ifdef _WIN32 timestamp_digits = __mingw_snprintf(scratchpad, 256, "%lli", time); #else timestamp_digits = snprintf(scratchpad, 256, "%lli", time); #endif return timestamp_digits; } int edfplus_annotation_get_tal_timestamp_decimal_cnt(struct edfhdrblock *hdr) { int i, j, timestamp_decimals; if(hdr==NULL) { return -1; } j = 10; for(timestamp_decimals=7; timestamp_decimals>0; timestamp_decimals--) { if(hdr->long_data_record_duration % j) { break; } j *= 10; } if((hdr->edfplus==1)||(hdr->bdfplus==1)) { j = 10; for(i=7; i>0; i--) { if(hdr->starttime_offset % j) { break; } j *= 10; } if(i > timestamp_decimals) { timestamp_decimals = i; } } return timestamp_decimals; } int strip_types_from_label(char *label) { int i, type, len; len = strlen(label); if(len<5) { return 0; } for(type=0; type<7; type++) { if(!strncmp(label, edf_label_types[type], 4)) { break; } } if(type == 7) { return 0; } if(label[4] == ' ') { return 0; } for(i=0; i<(len-4); i++) { label[i] = label[i+4]; } for(; i<len; i++) { label[i] = ' '; } return (type + 1); } |