0001 function se_hdr = GE_readHeaderSeries(fid, byte_align)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 se_hdr = struct('se_suid', fread(fid,4,'uchar'));
0018 se_hdr = setfield(se_hdr, 'se_uniq', fread(fid,1,'int16'));
0019 se_hdr = setfield(se_hdr, 'se_diskid', fread(fid,1,'uchar'));
0020 fseek(fid,1,0);
0021 se_hdr = setfield(se_hdr, 'se_exno', fread(fid,1,'uint16'));
0022 se_hdr = setfield(se_hdr, 'se_no ', fread(fid,1,'int16'));
0023 se_hdr = setfield(se_hdr, 'se_datetime', fread(fid,1,'int32'));
0024 se_hdr = setfield(se_hdr, 'se_actual_dt', fread(fid,1,'int32'));
0025 se_hdr = setfield(se_hdr, 'se_desc', fread(fid,30,'uchar'));
0026 se_hdr = setfield(se_hdr, 'pr_sysid', fread(fid,9,'uchar'));
0027 se_hdr = setfield(se_hdr, 'pansysid', fread(fid,9,'uchar'));
0028 se_hdr = setfield(se_hdr, 'se_typ ', fread(fid,1,'int16'));
0029 se_hdr = setfield(se_hdr, 'se_source ', fread(fid,1,'int16'));
0030 se_hdr = setfield(se_hdr, 'se_plane ', fread(fid,1,'int16'));
0031 se_hdr = setfield(se_hdr, 'scan_type ', fread(fid,1,'int16'));
0032 se_hdr = setfield(se_hdr, 'position', fread(fid,1,'int32'));
0033 se_hdr = setfield(se_hdr, 'entry', fread(fid,1,'int32'));
0034 se_hdr = setfield(se_hdr, 'anref', fread(fid,3,'uchar'));
0035 fseek(fid,1,0);
0036 se_hdr = setfield(se_hdr, 'lmhor', fread(fid,1,'float32'));
0037 se_hdr = setfield(se_hdr, 'prtcl', fread(fid,25,'uchar'));
0038 fseek(fid,1,0);
0039 se_hdr = setfield(se_hdr, 'se_contrast ', fread(fid,1,'int16'));
0040 se_hdr = setfield(se_hdr, 'start_ras', fread(fid,1,'uchar'));
0041 fseek(fid,1,0);
0042 if byte_align; fseek(fid,2,0); end
0043 se_hdr = setfield(se_hdr, 'start_loc', fread(fid,1,'float32'));
0044 se_hdr = setfield(se_hdr, 'end_ras', fread(fid,1,'uchar'));
0045 fseek(fid,1,0);
0046 if byte_align; fseek(fid,2,0); end
0047 se_hdr = setfield(se_hdr, 'end_loc', fread(fid,1,'float32'));
0048 se_hdr = setfield(se_hdr, 'se_pseq ', fread(fid,1,'int16'));
0049 se_hdr = setfield(se_hdr, 'se_sortorder ', fread(fid,1,'int16'));
0050 se_hdr = setfield(se_hdr, 'se_lndmrkcnt', fread(fid,1,'int32'));
0051 se_hdr = setfield(se_hdr, 'se_nacq ', fread(fid,1,'int16'));
0052 se_hdr = setfield(se_hdr, 'xbasest ', fread(fid,1,'int16'));
0053 se_hdr = setfield(se_hdr, 'xbaseend', fread(fid,1,'int16'));
0054 se_hdr = setfield(se_hdr, 'xenhst', fread(fid,1,'int16'));
0055 se_hdr = setfield(se_hdr, 'xenhend', fread(fid,1,'int16'));
0056 if byte_align; fseek(fid,2,0); end
0057 se_hdr = setfield(se_hdr, 'se_lastmod', fread(fid,1,'int32'));
0058 se_hdr = setfield(se_hdr, 'se_alloc_key', fread(fid,13,'uchar'));
0059 fseek(fid,1,0);
0060 if byte_align; fseek(fid,2,0); end
0061 se_hdr = setfield(se_hdr, 'se_delta_cnt', fread(fid,1,'int32'));
0062 se_hdr = setfield(se_hdr, 'se_verscre', fread(fid,2,'uchar'));
0063 se_hdr = setfield(se_hdr, 'se_verscur', fread(fid,2,'uchar'));
0064 se_hdr = setfield(se_hdr, 'se_pds_a', fread(fid,1,'float32'));
0065 se_hdr = setfield(se_hdr, 'se_pds_c', fread(fid,1,'float32'));
0066 se_hdr = setfield(se_hdr, 'se_pds_u', fread(fid,1,'float32'));
0067 se_hdr = setfield(se_hdr, 'se_checksum', fread(fid,1,'uint32'));
0068 se_hdr = setfield(se_hdr, 'se_complete', fread(fid,1,'int32'));
0069 se_hdr = setfield(se_hdr, 'se_numarch', fread(fid,1,'int32'));
0070 se_hdr = setfield(se_hdr, 'se_imagect', fread(fid,1,'int32'));
0071 se_hdr = setfield(se_hdr, 'se_numimages', fread(fid,1,'int32'));
0072 se_hdr = setfield(se_hdr, 'se_images', struct('length', fread(fid,1,'uint32'), ...
0073 'data', fread(fid,1,'uint32')));
0074 se_hdr = setfield(se_hdr, 'se_numunimg', fread(fid,1,'int32'));
0075 se_hdr = setfield(se_hdr, 'se_unimages', struct('length', fread(fid,1,'uint32'), ...
0076 'data', fread(fid,1,'uint32')));
0077 se_hdr = setfield(se_hdr, 'se_toarchcnt', fread(fid,1,'int32'));
0078 se_hdr = setfield(se_hdr, 'se_toarchive', struct('length', fread(fid,1,'uint32'), ...
0079 'data', fread(fid,1,'uint32')));
0080 se_hdr = setfield(se_hdr, 'echo1_alpha', fread(fid,1,'float32'));
0081 se_hdr = setfield(se_hdr, 'echo1_beta', fread(fid,1,'float32'));
0082 se_hdr = setfield(se_hdr, 'echo1_window', fread(fid,1,'uint16'));
0083 se_hdr = setfield(se_hdr, 'echo1_level', fread(fid,1,'int16'));
0084 se_hdr = setfield(se_hdr, 'echo2_alpha', fread(fid,1,'float32'));
0085 se_hdr = setfield(se_hdr, 'echo2_beta', fread(fid,1,'float32'));
0086 se_hdr = setfield(se_hdr, 'echo2_window', fread(fid,1,'uint16'));
0087 se_hdr = setfield(se_hdr, 'echo2_level', fread(fid,1,'int16'));
0088 se_hdr = setfield(se_hdr, 'echo3_alpha', fread(fid,1,'float32'));
0089 se_hdr = setfield(se_hdr, 'echo3_beta', fread(fid,1,'float32'));
0090 se_hdr = setfield(se_hdr, 'echo3_window', fread(fid,1,'uint16'));
0091 se_hdr = setfield(se_hdr, 'echo3_level', fread(fid,1,'int16'));
0092 se_hdr = setfield(se_hdr, 'echo4_alpha', fread(fid,1,'float32'));
0093 se_hdr = setfield(se_hdr, 'echo4_beta', fread(fid,1,'float32'));
0094 se_hdr = setfield(se_hdr, 'echo4_window', fread(fid,1,'uint16'));
0095 se_hdr = setfield(se_hdr, 'echo4_level', fread(fid,1,'int16'));
0096 se_hdr = setfield(se_hdr, 'echo5_alpha', fread(fid,1,'float32'));
0097 se_hdr = setfield(se_hdr, 'echo5_beta', fread(fid,1,'float32'));
0098 se_hdr = setfield(se_hdr, 'echo5_window', fread(fid,1,'uint16'));
0099 se_hdr = setfield(se_hdr, 'echo5_level', fread(fid,1,'int16'));
0100 se_hdr = setfield(se_hdr, 'echo6_alpha', fread(fid,1,'float32'));
0101 se_hdr = setfield(se_hdr, 'echo6_beta', fread(fid,1,'float32'));
0102 se_hdr = setfield(se_hdr, 'echo6_window', fread(fid,1,'uint16'));
0103 se_hdr = setfield(se_hdr, 'echo6_level', fread(fid,1,'int16'));
0104 se_hdr = setfield(se_hdr, 'echo7_alpha', fread(fid,1,'float32'));
0105 se_hdr = setfield(se_hdr, 'echo7_beta', fread(fid,1,'float32'));
0106 se_hdr = setfield(se_hdr, 'echo7_window', fread(fid,1,'uint16'));
0107 se_hdr = setfield(se_hdr, 'echo7_level', fread(fid,1,'int16'));
0108 se_hdr = setfield(se_hdr, 'echo8_alpha', fread(fid,1,'float32'));
0109 se_hdr = setfield(se_hdr, 'echo8_beta', fread(fid,1,'float32'));
0110 se_hdr = setfield(se_hdr, 'echo8_window', fread(fid,1,'uint16'));
0111 se_hdr = setfield(se_hdr, 'echo8_level', fread(fid,1,'int16'));
0112 se_hdr = setfield(se_hdr, 'series_uid', fread(fid,32,'uchar'));
0113 se_hdr = setfield(se_hdr, 'landmark_uid', fread(fid,32,'uchar'));
0114 se_hdr = setfield(se_hdr, 'equipmnt_uid', fread(fid,32,'uchar'));
0115 se_hdr = setfield(se_hdr, 'se_padding', fread(fid,588,'uchar'));
0116
0117 return