| 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 |
#if defined(_MSC_VER) && (_MSC_VER < 1600) |
| 27 |
#define __LITTLE_ENDIAN=1 |
| 28 |
#define __BIG_ENDIAN=0 |
| 29 |
USEUNIT("t210/scp-decode.cpp"); |
| 30 |
#include "patient.h" |
| 31 |
#include <alloc.h> |
| 32 |
#endif |
| 33 |
|
| 34 |
#include "../biosig.h" |
| 35 |
#include "../t210/structures.h" |
| 36 |
#include <stdio.h> |
| 37 |
#include <string.h> |
| 38 |
#include <stdlib.h> |
| 39 |
|
| 40 |
int scp_decode(HDRTYPE* hdr, pointer_section *info_sections, DATA_DECODE &info_decoding, DATA_RECORD &info_recording, DATA_INFO &info_textual, bool &add_filter); |
| 41 |
|
| 42 |
|
| 43 |
int main(int argc, char* argv[]) |
| 44 |
{ |
| 45 |
HDRTYPE *hdr ; |
| 46 |
pointer_section *section; |
| 47 |
DATA_DECODE decode; |
| 48 |
DATA_RECORD record; |
| 49 |
DATA_INFO textual; |
| 50 |
bool add_filter=true; |
| 51 |
FILE *in; |
| 52 |
|
| 53 |
hdr = (HDRTYPE *)malloc(sizeof(HDRTYPE)); |
| 54 |
if( (section = (pointer_section *)malloc(sizeof(pointer_section)*12)) ==NULL) |
| 55 |
{ |
| 56 |
return 2; |
| 57 |
} |
| 58 |
hdr->FileName=argv[1]; |
| 59 |
hdr->FILE.OPEN=0; |
| 60 |
hdr->FILE.COMPRESSION=0; |
| 61 |
scp_decode(hdr, section, decode, record, textual, add_filter); |
| 62 |
|
| 63 |
for (int i=0;i<decode.flag_Res.number_samples;i+=2500) |
| 64 |
for (int k=0;k<8;k+=3) |
| 65 |
{ |
| 66 |
int x=decode.Reconstructed[i+k*5000]; |
| 67 |
fprintf(stdout,"%i %i %i\n",i,k,x); |
| 68 |
} |
| 69 |
return(0); |
| 70 |
} |
| 71 |
|