Logo Search packages:      
Sourcecode: edfbrowser version File versions  Download package

global.h

/*
***************************************************************************
*
* Author: Teunis van Beelen
*
* Copyright (C) 2007, 2008, 2009 Teunis van Beelen
*
* teuniz@gmail.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 2 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
***************************************************************************
*
* This version of GPL is at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
*
***************************************************************************
*/


#ifndef VIEWER_GLOBAL_H
#define VIEWER_GLOBAL_H


#define PROGRAM_NAME "EDFbrowser"
#define PROGRAM_VERSION "1.18"
#define MINIMUM_QT_VERSION 0x040503
#define MAXFILES 32
#define MAXSIGNALS 256
#define MAXFILTERS 8
#define TIME_DIMENSION (10000000LL)
#define MAX_ANNOTATION_LEN 512
#define VIEWTIME_SYNCED_OFFSET 0
#define VIEWTIME_SYNCED_ABSOLUT 1
#define VIEWTIME_UNSYNCED 2
#define VIEWTIME_USER_DEF_SYNCED 3
#define MAX_RECENTFILES 8
#define MAX_ACTIVE_ANNOT_MARKERS 64


#include "s_calloc.h"



struct edfparamblock{
        char   label[17];
        char   transducer[81];
        char   physdimension[9];
        double phys_min;
        double phys_max;
        int    dig_min;
        int    dig_max;
        char   prefilter[81];
        int    smp_per_record;
        char   reserved[33];
        int    offset;
        int    buf_offset;
        double bitvalue;
        int    annotation;
      };

struct edfhdrblock{
        FILE      *file_hdl;
        char      version[32];
        char      filename[1024];
        char      patient[81];
        char      recording[81];
        char      plus_patientcode[81];
        char      plus_gender[16];
        char      plus_birthdate[16];
        char      plus_patient_name[81];
        char      plus_patient_additional[81];
        char      plus_startdate[16];
        char      plus_admincode[81];
        char      plus_technician[81];
        char      plus_equipment[81];
        char      plus_recording_additional[81];
        long long l_starttime;
        long long utc_starttime;
        char      reserved[45];
        int       hdrsize;
        int       edfsignals;
        long long datarecords;
        int       recordsize;
        int       annot_ch[256];
        int       nr_annot_chns;
        int       edf;
        int       edfplus;
        int       bdf;
        int       bdfplus;
        int       discontinuous;
        double    data_record_duration;
        long long long_data_record_duration;
        long long viewtime;
        long long starttime_offset;
        long long prefiltertime;
        struct edfparamblock *edfparam;
      };

struct signalcompblock{
        int filenum;
        struct edfhdrblock *edfhdr;
        int num_of_signals;
        int viewbufsize;
        int viewbufoffset;
        long long records_in_viewbuf;
        long long samples_in_viewbuf;
        long long samples_on_screen;
        long long sample_start;
        long long sample_stop;
        int timeoffset;
        int sample_timeoffset;
        double sample_pixel_ratio;
        int edfsignal[MAXSIGNALS];
        int factor[MAXSIGNALS];
        double sensitivity[MAXSIGNALS];
        int oldvalue;
        long long oldsmplnr;
        long long file_duration;
        char signallabel[512];
        int signallabellen;
        int hascursor1;
        int hascursor2;
        int hasoffsettracking;
        int hasgaintracking;
        int hasruler;
        int screen_offset;
        double voltpercm;
        char physdimension[9];
        int color;
        int filter_cnt;
        int samples_in_prefilterbuf;
        double filterpreset_a[MAXFILTERS];
        double filterpreset_b[MAXFILTERS];
        struct filter_settings *filter[MAXFILTERS];
        int max_dig_value;
        int min_dig_value;
      };

struct zoomhistoryblock{
        int pntr;
        int history_size_tail;
        int history_size_front;
        long long viewtime[64][MAXFILES];
        long long pagetime[64];
        double voltpercm[64][MAXSIGNALS];
        double sensitivity[64][MAXSIGNALS][MAXSIGNALS];
        int screen_offset[64][MAXSIGNALS];
       };

struct annotationblock{
        int file_num;
        long long onset;
        char duration[16];
        char annotation[MAX_ANNOTATION_LEN + 1];
        struct annotationblock *former_annotation;
        struct annotationblock *next_annotation;
        int modified;
        int x_pos;
        int selected;
        int jump;
       };

struct active_markersblock{
        int file_num;
        struct annotationblock *list[MAX_ACTIVE_ANNOT_MARKERS];
        int count;
        int selected;
       };

#endif




Generated by  Doxygen 1.6.0   Back to index