Home > fmri > utils > GE2SPM > GE_readHeaderImage.m

GE_readHeaderImage

PURPOSE ^

SYNOPSIS ^

function im_hdr = GE_readHeaderImage(fid, byte_align)

DESCRIPTION ^

 im_hdr = GE_readHeaderImage(fid, byte_align)

 Loads the image header from a file with filed id fid
 and returns it as a structure. 
 if byte_align = 1 then 32-bit alignment (SGI, LX2 format)
 if byte_align = 0 then 16-bit alignment (Sun, 5.X format)


 Souheil J. Inati
 Dartmouth College
 May 2000
 souheil.inati@dartmouth.edu

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function im_hdr = GE_readHeaderImage(fid, byte_align)
0002 %
0003 % im_hdr = GE_readHeaderImage(fid, byte_align)
0004 %
0005 % Loads the image header from a file with filed id fid
0006 % and returns it as a structure.
0007 % if byte_align = 1 then 32-bit alignment (SGI, LX2 format)
0008 % if byte_align = 0 then 16-bit alignment (Sun, 5.X format)
0009 %
0010 %
0011 % Souheil J. Inati
0012 % Dartmouth College
0013 % May 2000
0014 % souheil.inati@dartmouth.edu
0015 %
0016 
0017 % define the structure and read in the data
0018 % to overcome the byte alignment problems
0019 % break up the assignment into pieces using the setfield function
0020 
0021 im_hdr = struct('im_suid', fread(fid,4,'uchar')); %Suite id for this image
0022 im_hdr = setfield(im_hdr, 'im_uniq', fread(fid,1,'int16'));            %The Make-Unique Flag
0023 im_hdr = setfield(im_hdr, 'im_diskid', fread(fid,1,'uchar'));          %Disk ID for this Image
0024 fseek(fid, 1, 0);% 16-bit alignment
0025 im_hdr = setfield(im_hdr, 'im_exno', fread(fid,1,'uint16'));            %Exam number for this image
0026 im_hdr = setfield(im_hdr, 'im_seno', fread(fid,1,'int16'));            %Series Number for this image
0027 im_hdr = setfield(im_hdr, 'im_no', fread(fid,1,'int16'));              %Image Number
0028 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0029 im_hdr = setfield(im_hdr, 'im_datetime', fread(fid,1,'int32'));        %Allocation Image date/time stamp
0030 im_hdr = setfield(im_hdr, 'im_actual_dt', fread(fid,1,'int32'));       %Actual Image date/time stamp
0031 im_hdr = setfield(im_hdr, 'sctime', fread(fid,1,'float32'));             %Duration of scan
0032 im_hdr = setfield(im_hdr, 'slthick', fread(fid,1,'float32'));            %Slice Thickness (mm)
0033 im_hdr = setfield(im_hdr, 'imatrix_X', fread(fid,1,'int16'));          %Image matrix size - X
0034 im_hdr = setfield(im_hdr, 'imatrix_Y', fread(fid,1,'int16'));          %Image matrix size - Y
0035 im_hdr = setfield(im_hdr, 'dfov', fread(fid,1,'float32'));               %Display field of view - X (mm)
0036 im_hdr = setfield(im_hdr, 'dfov_rect', fread(fid,1,'float32'));          %Display field of view - Y (if different)
0037 im_hdr = setfield(im_hdr, 'dim_X', fread(fid,1,'float32'));              %Image dimension - X
0038 im_hdr = setfield(im_hdr, 'dim_Y', fread(fid,1,'float32'));              %Image dimension - Y
0039 im_hdr = setfield(im_hdr, 'pixsize_X', fread(fid,1,'float32'));          %Image pixel size - X
0040 im_hdr = setfield(im_hdr, 'pixsize_Y', fread(fid,1,'float32'));          %Image pixel size - Y
0041 im_hdr = setfield(im_hdr, 'pdid', fread(fid,14,'uchar'));          %Pixel Data ID
0042 im_hdr = setfield(im_hdr, 'contrastIV', fread(fid,17,'uchar'));    %IV Contrast Agent
0043 im_hdr = setfield(im_hdr, 'contrastOral', fread(fid,17,'uchar'));  %Oral Contrast Agent
0044 im_hdr = setfield(im_hdr, 'contmode', fread(fid,1,'int16'));           %Image Contrast Mode
0045 im_hdr = setfield(im_hdr, 'serrx', fread(fid,1,'int16'));              %Series from which prescribed
0046 im_hdr = setfield(im_hdr, 'imgrx', fread(fid,1,'int16'));              %Image from which prescribed
0047 im_hdr = setfield(im_hdr, 'screenformat', fread(fid,1,'int16'));       %Screen Format(8/16 bit)
0048 im_hdr = setfield(im_hdr, 'plane', fread(fid,1,'int16'));              %Plane Type
0049 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0050 im_hdr = setfield(im_hdr, 'scanspacing', fread(fid,1,'float32'));        %Spacing between scans (mm?)
0051 im_hdr = setfield(im_hdr, 'im_compress', fread(fid,1,'int16'));        %Image compression type for allocation
0052 im_hdr = setfield(im_hdr, 'im_scouttype', fread(fid,1,'int16'));       %Scout Type (AP or lateral)
0053 im_hdr = setfield(im_hdr, 'loc_ras', fread(fid,1,'uchar'));            %RAS letter of image location
0054 fseek(fid, 1, 0); % 16-bit alignment
0055 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0056 im_hdr = setfield(im_hdr, 'loc', fread(fid,1,'float32'));                %Image location
0057 im_hdr = setfield(im_hdr, 'ctr_R', fread(fid,1,'float32'));              %Center R coord of plane image
0058 im_hdr = setfield(im_hdr, 'ctr_A', fread(fid,1,'float32'));              %Center A coord of plane image
0059 im_hdr = setfield(im_hdr, 'ctr_S', fread(fid,1,'float32'));              %Center S coord of plane image
0060 im_hdr = setfield(im_hdr, 'norm_R', fread(fid,1,'float32'));             %Normal R coord
0061 im_hdr = setfield(im_hdr, 'norm_A', fread(fid,1,'float32'));             %Normal A coord
0062 im_hdr = setfield(im_hdr, 'norm_S', fread(fid,1,'float32'));             %Normal S coord
0063 im_hdr = setfield(im_hdr, 'tlhc_R', fread(fid,1,'float32'));             %R Coord of Top Left Hand Corner
0064 im_hdr = setfield(im_hdr, 'tlhc_A', fread(fid,1,'float32'));             %A Coord of Top Left Hand Corner
0065 im_hdr = setfield(im_hdr, 'tlhc_S', fread(fid,1,'float32'));             %S Coord of Top Left Hand Corner
0066 im_hdr = setfield(im_hdr, 'trhc_R', fread(fid,1,'float32'));             %R Coord of Top Right Hand Corner
0067 im_hdr = setfield(im_hdr, 'trhc_A', fread(fid,1,'float32'));             %A Coord of Top Right Hand Corner
0068 im_hdr = setfield(im_hdr, 'trhc_S', fread(fid,1,'float32'));             %S Coord of Top Right Hand Corner
0069 im_hdr = setfield(im_hdr, 'brhc_R', fread(fid,1,'float32'));             %R Coord of Bottom Right Hand Corner
0070 im_hdr = setfield(im_hdr, 'brhc_A', fread(fid,1,'float32'));             %A Coord of Bottom Right Hand Corner
0071 im_hdr = setfield(im_hdr, 'brhc_S', fread(fid,1,'float32'));             %S Coord of Bottom Right Hand Corner
0072 im_hdr = setfield(im_hdr, 'forimgrev', fread(fid,4,'uchar'));      %Foreign Image Revision
0073 im_hdr = setfield(im_hdr, 'tr', fread(fid,1,'int32'));                 %Pulse repetition time(usec)
0074 im_hdr = setfield(im_hdr, 'ti', fread(fid,1,'int32'));                 %Pulse inversion time(usec)
0075 im_hdr = setfield(im_hdr, 'te', fread(fid,1,'int32'));                 %Pulse echo time(usec)
0076 im_hdr = setfield(im_hdr, 'te2', fread(fid,1,'int32'));                %Second echo echo (usec)
0077 im_hdr = setfield(im_hdr, 'numecho', fread(fid,1,'int16'));            %Number of echoes
0078 im_hdr = setfield(im_hdr, 'echonum', fread(fid,1,'int16'));            %Echo Number
0079 im_hdr = setfield(im_hdr, 'tbldlta', fread(fid,1,'float32'));            %Table Delta
0080 im_hdr = setfield(im_hdr, 'nex', fread(fid,1,'float32'));                %Number of Excitations
0081 im_hdr = setfield(im_hdr, 'contig', fread(fid,1,'int16'));             %Continuous Slices Flag
0082 im_hdr = setfield(im_hdr, 'hrtrate', fread(fid,1,'int16'));            %Cardiac Heart Rate (bpm)
0083 im_hdr = setfield(im_hdr, 'tdel', fread(fid,1,'int32'));               %Delay time after trigger (msec)
0084 im_hdr = setfield(im_hdr, 'saravg', fread(fid,1,'float32'));             %Average SAR
0085 im_hdr = setfield(im_hdr, 'sarpeak', fread(fid,1,'float32'));            %Peak SAR
0086 im_hdr = setfield(im_hdr, 'monsar', fread(fid,1,'int16'));             %Monitor SAR flag
0087 im_hdr = setfield(im_hdr, 'trgwindow', fread(fid,1,'int16'));          %Trigger window (% of R-R interval)
0088 im_hdr = setfield(im_hdr, 'reptime', fread(fid,1,'float32'));            %Cardiac repetition time
0089 im_hdr = setfield(im_hdr, 'imgpcyc', fread(fid,1,'int16'));            %Images per cardiac cycle
0090 im_hdr = setfield(im_hdr, 'xmtgain', fread(fid,1,'int16'));            %Actual Transmit Gain (.1 db)
0091 im_hdr = setfield(im_hdr, 'rcvgain1', fread(fid,1,'int16'));           %Actual Receive Gain Analog (.1 db)
0092 im_hdr = setfield(im_hdr, 'rcvgain2', fread(fid,1,'int16'));           %Actual Receive Gain Digital (.1 db)
0093 im_hdr = setfield(im_hdr, 'mr_flip', fread(fid,1,'int16'));            %Flip Angle for GRASS scans (deg.)
0094 if byte_align; fseek(fid, 2, 0); end % byte alignment
0095 im_hdr = setfield(im_hdr, 'mindat', fread(fid,1,'int32'));             %Minimum Delay after Trigger (uSec)
0096 im_hdr = setfield(im_hdr, 'cphase', fread(fid,1,'int16'));             %Total Cardiac Phase prescribed
0097 im_hdr = setfield(im_hdr, 'swappf', fread(fid,1,'int16'));             %Swap Phase/Frequency Axis
0098 im_hdr = setfield(im_hdr, 'pauseint', fread(fid,1,'int16'));           %Pause Interval (slices)
0099 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0100 im_hdr = setfield(im_hdr, 'pausetime', fread(fid,1,'float32'));          %Pause Time
0101 im_hdr = setfield(im_hdr, 'obplane', fread(fid,1,'int32'));            %Oblique Plane
0102 im_hdr = setfield(im_hdr, 'slocfov', fread(fid,1,'int32'));            %Slice Offsets on Freq axis
0103 im_hdr = setfield(im_hdr, 'xmtfreq', fread(fid,1,'int32'));            %Center Frequency (0.1 Hz)
0104 im_hdr = setfield(im_hdr, 'autoxmtfreq', fread(fid,1,'int32'));        %Auto Center Frequency (0.1 Hz)
0105 im_hdr = setfield(im_hdr, 'autoxmtgain', fread(fid,1,'int16'));        %Auto Transmit Gain (0.1 dB)
0106 im_hdr = setfield(im_hdr, 'prescan_r1', fread(fid,1,'int16'));         %PreScan R1 - Analog
0107 im_hdr = setfield(im_hdr, 'prescan_r2', fread(fid,1,'int16'));         %PreScan R2 - Digital
0108 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0109 im_hdr = setfield(im_hdr, 'user_bitmap', fread(fid,1,'int32'));        %Bitmap defining user CVs
0110 im_hdr = setfield(im_hdr, 'cenfreq', fread(fid,1,'int16'));            %Center Frequency Method
0111 im_hdr = setfield(im_hdr, 'imode', fread(fid,1,'int16'));              %Imaging Mode
0112 im_hdr = setfield(im_hdr, 'iopt', fread(fid,1,'int32'));               %Imaging Options
0113 im_hdr = setfield(im_hdr, 'pseq', fread(fid,1,'int16'));               %Pulse Sequence
0114 im_hdr = setfield(im_hdr, 'pseqmode', fread(fid,1,'int16'));           %Pulse Sequence Mode
0115 im_hdr = setfield(im_hdr, 'psdname', fread(fid,33,'uchar'));       %Pulse Sequence Name
0116 fseek(fid,1,0); % 16-bit alignment
0117 if byte_align; fseek(fid, 2, 0); end % byte alignment
0118 im_hdr = setfield(im_hdr, 'psd_datetime', fread(fid,1,'int32'));       %PSD Creation Date and Time
0119 im_hdr = setfield(im_hdr, 'psd_iname', fread(fid,13,'uchar'));     %PSD name from inside PSD
0120 fseek(fid, 1, 0); % 16-bit alignment
0121 im_hdr = setfield(im_hdr, 'ctyp', fread(fid,1,'int16'));               %Coil Type
0122 im_hdr = setfield(im_hdr, 'cname', fread(fid,17,'uchar'));         %Coil Name
0123 fseek(fid, 1, 0); % 16-bit alignment
0124 im_hdr = setfield(im_hdr, 'surfctyp', fread(fid,1,'int16'));           %Surface Coil Type
0125 im_hdr = setfield(im_hdr, 'surfcext', fread(fid,1,'int16'));           %Extremity Coil Flag
0126 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0127 im_hdr = setfield(im_hdr, 'rawrunnum', fread(fid,1,'int32'));          %RawData Run Number
0128 im_hdr = setfield(im_hdr, 'cal_fldstr', fread(fid,1,'uint32'));         %Calibrated Field Strength (x10 uGauss)
0129 im_hdr = setfield(im_hdr, 'supp_tech', fread(fid,1,'int16'));          %SAT fat/water/none
0130 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0131 im_hdr = setfield(im_hdr, 'vbw', fread(fid,1,'float32'));                %Variable Bandwidth (Hz)
0132 im_hdr = setfield(im_hdr, 'slquant', fread(fid,1,'int16'));            %Number of slices in this scan group
0133 im_hdr = setfield(im_hdr, 'gpre', fread(fid,1,'int16'));               %Graphically prescribed
0134 im_hdr = setfield(im_hdr, 'intr_del', fread(fid,1,'int32'));           %Interimage/interloc delay (uSec)
0135 im_hdr = setfield(im_hdr, 'user0', fread(fid,1,'float32'));              %User Variable 0
0136 im_hdr = setfield(im_hdr, 'user1', fread(fid,1,'float32'));              %User Variable 1
0137 im_hdr = setfield(im_hdr, 'user2', fread(fid,1,'float32'));              %User Variable 2
0138 im_hdr = setfield(im_hdr, 'user3', fread(fid,1,'float32'));              %User Variable 3
0139 im_hdr = setfield(im_hdr, 'user4', fread(fid,1,'float32'));              %User Variable 4
0140 im_hdr = setfield(im_hdr, 'user5', fread(fid,1,'float32'));              %User Variable 5
0141 im_hdr = setfield(im_hdr, 'user6', fread(fid,1,'float32'));              %User Variable 6
0142 im_hdr = setfield(im_hdr, 'user7', fread(fid,1,'float32'));              %User Variable 7
0143 im_hdr = setfield(im_hdr, 'user8', fread(fid,1,'float32'));              %User Variable 8
0144 im_hdr = setfield(im_hdr, 'user9', fread(fid,1,'float32'));              %User Variable 9
0145 im_hdr = setfield(im_hdr, 'user10', fread(fid,1,'float32'));             %User Variable 10
0146 im_hdr = setfield(im_hdr, 'user11', fread(fid,1,'float32'));             %User Variable 11
0147 im_hdr = setfield(im_hdr, 'user12', fread(fid,1,'float32'));             %User Variable 12
0148 im_hdr = setfield(im_hdr, 'user13', fread(fid,1,'float32'));             %User Variable 13
0149 im_hdr = setfield(im_hdr, 'user14', fread(fid,1,'float32'));             %User Variable 14
0150 im_hdr = setfield(im_hdr, 'user15', fread(fid,1,'float32'));             %User Variable 15
0151 im_hdr = setfield(im_hdr, 'user16', fread(fid,1,'float32'));             %User Variable 16
0152 im_hdr = setfield(im_hdr, 'user17', fread(fid,1,'float32'));             %User Variable 17
0153 im_hdr = setfield(im_hdr, 'user18', fread(fid,1,'float32'));             %User Variable 18
0154 im_hdr = setfield(im_hdr, 'user19', fread(fid,1,'float32'));             %User Variable 19
0155 im_hdr = setfield(im_hdr, 'user20', fread(fid,1,'float32'));             %User Variable 20
0156 im_hdr = setfield(im_hdr, 'user21', fread(fid,1,'float32'));             %User Variable 21
0157 im_hdr = setfield(im_hdr, 'user22', fread(fid,1,'float32'));             %User Variable 22
0158 im_hdr = setfield(im_hdr, 'user23', fread(fid,1,'float32'));             %Projection Angle
0159 im_hdr = setfield(im_hdr, 'user24', fread(fid,1,'float32'));             %Concat Sat Type Flag
0160 im_hdr = setfield(im_hdr, 'im_alloc_key', fread(fid,13,'uchar'));
0161 fseek(fid, 1, 0); % 16-bit alignment
0162 if byte_align; fseek(fid, 2, 0); end % 32-bit alignment
0163 im_hdr = setfield(im_hdr, 'im_lastmod', fread(fid,1,'int32'));         %Date/Time of Last Change
0164 im_hdr = setfield(im_hdr, 'im_verscre', fread(fid,2,'uchar'));     %Genesis Version - Created
0165 im_hdr = setfield(im_hdr, 'im_verscur', fread(fid,2,'uchar'));     %Genesis Version - Now
0166 im_hdr = setfield(im_hdr, 'im_pds_a', fread(fid,1,'int32'));           %PixelData size - as stored
0167 im_hdr = setfield(im_hdr, 'im_pds_c', fread(fid,1,'int32'));           %PixelData size - Compressed
0168 im_hdr = setfield(im_hdr, 'im_pds_u', fread(fid,1,'int32'));           %PixelData size - UnCompressed
0169 im_hdr = setfield(im_hdr, 'im_checksum', fread(fid,1,'int32'));        %AcqRecon record checksum
0170 im_hdr = setfield(im_hdr, 'im_archived', fread(fid,1,'int32'));        %Image Archive Flag
0171 im_hdr = setfield(im_hdr, 'im_complete', fread(fid,1,'int32'));        %Image Complete Flag
0172 im_hdr = setfield(im_hdr, 'satbits', fread(fid,1,'int16'));            %Bitmap of SAT selections
0173 im_hdr = setfield(im_hdr, 'scic', fread(fid,1,'int16'));               %Surface Coil Intensity Correction Flag
0174 im_hdr = setfield(im_hdr, 'satxloc1', fread(fid,1,'int16'));           %R-side SAT pulse loc rel to lndmrk
0175 im_hdr = setfield(im_hdr, 'satxloc2', fread(fid,1,'int16'));           %L-side SAT pulse loc rel to lndmrk
0176 im_hdr = setfield(im_hdr, 'satyloc1', fread(fid,1,'int16'));           %A-side SAT pulse loc rel to lndmrk
0177 im_hdr = setfield(im_hdr, 'satyloc2', fread(fid,1,'int16'));           %P-side SAT pulse loc rel to lndmrk
0178 im_hdr = setfield(im_hdr, 'satzloc1', fread(fid,1,'int16'));           %S-side SAT pulse loc rel to lndmrk
0179 im_hdr = setfield(im_hdr, 'satzloc2', fread(fid,1,'int16'));           %I-side SAT pulse loc rel to lndmrk
0180 im_hdr = setfield(im_hdr, 'satxthick', fread(fid,1,'int16'));          %Thickness of X-axis SAT pulse
0181 im_hdr = setfield(im_hdr, 'satythick', fread(fid,1,'int16'));          %Thickness of Y-axis SAT pulse
0182 im_hdr = setfield(im_hdr, 'satzthick', fread(fid,1,'int16'));          %Thickness of Z-axis SAT pulse
0183 im_hdr = setfield(im_hdr, 'flax', fread(fid,1,'int16'));               %Phase contrast flow axis
0184 im_hdr = setfield(im_hdr, 'venc', fread(fid,1,'int16'));               %Phase contrast velocity encoding
0185 im_hdr = setfield(im_hdr, 'thk_disclmr', fread(fid,1,'int16'));        %Slice Thickness
0186 im_hdr = setfield(im_hdr, 'ps_flag', fread(fid,1,'int16'));            %Auto/Manual Prescan flag
0187 im_hdr = setfield(im_hdr, 'ps_status', fread(fid,1,'int16'));          %Bitmap of changed values
0188 im_hdr = setfield(im_hdr, 'image_type', fread(fid,1,'int16'));         %Magnitude, Phase, Imaginary, or Real
0189 im_hdr = setfield(im_hdr, 'vas_collapse', fread(fid,1,'int16'));       %Collapse Image
0190 im_hdr = setfield(im_hdr, 'user23n', fread(fid,1,'float32'));            %User Variable 23
0191 im_hdr = setfield(im_hdr, 'user24n', fread(fid,1,'float32'));            %User Variable 24
0192 im_hdr = setfield(im_hdr, 'proj_alg', fread(fid,1,'int16'));           %Projection Algorithm
0193 im_hdr = setfield(im_hdr, 'proj_name', fread(fid,13,'uchar'));     %Projection Algorithm Name
0194 fseek(fid, 1, 0); % 16-bit alignment
0195 im_hdr = setfield(im_hdr, 'x_axis_rot', fread(fid,1,'float32'));         %X Axis Rotation
0196 im_hdr = setfield(im_hdr, 'y_axis_rot', fread(fid,1,'float32'));         %Y Axis Rotation
0197 im_hdr = setfield(im_hdr, 'z_axis_rot', fread(fid,1,'float32'));         %Z Axis Rotation
0198 im_hdr = setfield(im_hdr, 'thresh_min1', fread(fid,1,'int32'));        %Lower Range of Pixels 1
0199 im_hdr = setfield(im_hdr, 'thresh_max1', fread(fid,1,'int32'));        %Upper Range of Pixels 1
0200 im_hdr = setfield(im_hdr, 'thresh_min2', fread(fid,1,'int32'));        %Lower Range of Pixels 2
0201 im_hdr = setfield(im_hdr, 'thresh_max2', fread(fid,1,'int32'));        %Upper Range of Pixels 2
0202 im_hdr = setfield(im_hdr, 'echo_trn_len', fread(fid,1,'int16'));       %Echo Train Length for Fast Spin Echo
0203 im_hdr = setfield(im_hdr, 'frac_echo', fread(fid,1,'int16'));          %Fractional Echo - Effective TE Flag
0204 im_hdr = setfield(im_hdr, 'prep_pulse', fread(fid,1,'int16'));         %Preporatory Pulse Option
0205 im_hdr = setfield(im_hdr, 'cphasenum', fread(fid,1,'int16'));          %Cardiac Phase Number
0206 im_hdr = setfield(im_hdr, 'var_echo', fread(fid,1,'int16'));           %Variable Echo Flag
0207 im_hdr = setfield(im_hdr, 'ref_img', fread(fid,1,'uchar'));            %Reference Image Field
0208 im_hdr = setfield(im_hdr, 'sum_img', fread(fid,1,'uchar'));            %Summary Image Field
0209 im_hdr = setfield(im_hdr, 'img_window', fread(fid,1,'uint16'));         %Window Value
0210 im_hdr = setfield(im_hdr, 'img_level', fread(fid,1,'int16'));          %Level Value
0211 im_hdr = setfield(im_hdr, 'slop_int_1', fread(fid,1,'int32'));         %Number of 3D Slabs
0212 im_hdr = setfield(im_hdr, 'slop_int_2', fread(fid,1,'int32'));         %Slice Locs Per 3D Slab
0213 im_hdr = setfield(im_hdr, 'slop_int_3', fread(fid,1,'int32'));         %# of Slice Locs on Each Slab Which Overlap Neighbors
0214 im_hdr = setfield(im_hdr, 'slop_int_4', fread(fid,1,'int32'));         %Image Filtering 0.5/0.2T
0215 im_hdr = setfield(im_hdr, 'slop_int_5', fread(fid,1,'int32'));         %Integer Slop Field 5
0216 im_hdr = setfield(im_hdr, 'slop_float_1', fread(fid,1,'float32'));       %Float Slop Field 1
0217 im_hdr = setfield(im_hdr, 'slop_float_2', fread(fid,1,'float32'));       %Float Slop Field 2
0218 im_hdr = setfield(im_hdr, 'slop_float_3', fread(fid,1,'float32'));       %Float Slop Field 3
0219 im_hdr = setfield(im_hdr, 'slop_float_4', fread(fid,1,'float32'));       %Float Slop Field 4
0220 im_hdr = setfield(im_hdr, 'slop_float_5', fread(fid,1,'float32'));       %Float Slop Field 5
0221 im_hdr = setfield(im_hdr, 'slop_str_1', fread(fid,16,'uchar'));    %String Slop Field 1
0222 im_hdr = setfield(im_hdr, 'slop_str_2', fread(fid,16,'uchar'));    %String Slop Field 2
0223 im_hdr = setfield(im_hdr, 'scanactno', fread(fid,1,'int16'));          %Scan Acquisition Number
0224 im_hdr = setfield(im_hdr, 'vasflags', fread(fid,1,'int16'));           %Magnitude Weighting Flag
0225 im_hdr = setfield(im_hdr, 'vencscale', fread(fid,1,'float32'));          %Scale Weighted Venc
0226 im_hdr = setfield(im_hdr, 'integrity', fread(fid,1,'int16'));          %GE Image Integrity
0227 if byte_align; fseek(fid, 2, 0); end % byte alignment
0228 im_hdr = setfield(im_hdr, 'fphase', fread(fid,1,'int32'));             %Number Of Phases
0229 im_hdr = setfield(im_hdr, 'freq_dir', fread(fid,1,'int16'));           %Frequency Direction
0230 im_hdr = setfield(im_hdr, 'vas_mode', fread(fid,1,'int16'));           %Vascular Mode
0231 im_hdr = setfield(im_hdr, 'image_uid', fread(fid,32,'uchar'));     %Image Unique ID
0232 im_hdr = setfield(im_hdr, 'sop_uid', fread(fid,32,'uchar'));       %Service Obj Class Unique ID
0233 im_hdr = setfield(im_hdr, 'dont_use_1', fread(fid,1,'int16'));         %This field is not used
0234 im_hdr = setfield(im_hdr, 'dont_use_2', fread(fid,1,'int16'));         %This field is not used
0235 im_hdr = setfield(im_hdr, 'dont_use_3', fread(fid,1,'int16'));         %This field is not used
0236 im_hdr = setfield(im_hdr, 'pscopts', fread(fid,1,'int16'));            %bitmap of prescan options
0237 im_hdr = setfield(im_hdr, 'asoffsetx', fread(fid,1,'int16'));          %gradient offset in X-direction
0238 im_hdr = setfield(im_hdr, 'asoffsety', fread(fid,1,'int16'));          %gradient offset in Y-direction
0239 im_hdr = setfield(im_hdr, 'asoffsetz', fread(fid,1,'int16'));          %gradient offset in Z-direction
0240 im_hdr = setfield(im_hdr, 'unoriginal', fread(fid,1,'int16'));         %identifies image as original or unoriginal
0241 im_hdr = setfield(im_hdr, 'interleaves', fread(fid,1,'int16'));        %number of EPI shots
0242 im_hdr = setfield(im_hdr, 'effechospace', fread(fid,1,'int16'));       %effective echo spacing for EPI
0243 im_hdr = setfield(im_hdr, 'viewsperseg', fread(fid,1,'int16'));        %views per segment
0244 im_hdr = setfield(im_hdr, 'rbpm', fread(fid,1,'int16'));               %respiratory rate, breaths per min
0245 im_hdr = setfield(im_hdr, 'rtpoint', fread(fid,1,'int16'));            %respiratory trigger point as percent of max.
0246 im_hdr = setfield(im_hdr, 'rcvrtype', fread(fid,1,'int16'));           %type of receiver used
0247 im_hdr = setfield(im_hdr, 'dbdt', fread(fid,1,'float32'));               %peak rate of change of gradient field, tesla/sec
0248 im_hdr = setfield(im_hdr, 'dbdtper', fread(fid,1,'float32'));            %limit in units of percent of theoretical curve
0249 im_hdr = setfield(im_hdr, 'estdbdtper', fread(fid,1,'float32'));         %PSD estimated limit in units of percent
0250 im_hdr = setfield(im_hdr, 'estdbdtts', fread(fid,1,'float32'));          %PSD estimated limit in Teslas/sec
0251 im_hdr = setfield(im_hdr, 'saravghead', fread(fid,1,'float32'));         %Avg head SAR
0252 im_hdr = setfield(im_hdr, 'neg_scanspacing', fread(fid,1,'float32'));    %Negative scan spacing for overlap slices
0253 im_hdr = setfield(im_hdr, 'offsetfreq', fread(fid,1,'int32'));         %Offset Frequency - Mag.Transfer
0254 im_hdr = setfield(im_hdr, 'user_usage_tag', fread(fid,1,'uint32'));     %Defines how following user CVs are to be filled in
0255                                                  %Default value = 0x00000000
0256                                                   %GE range = 0x00000001 - 0x7fffffff
0257                                                   %Research = 0x80000000 - 0xffffffff
0258 im_hdr = setfield(im_hdr, 'user_fill_mapMSW', fread(fid,1,'uint32'));   %Define what process fills in the user CVs, ifcc or TIR
0259 im_hdr = setfield(im_hdr, 'user_fill_mapLSW', fread(fid,1,'uint32'));   %Define what process fills in the user CVs, ifcc or TIR
0260 im_hdr = setfield(im_hdr, 'user25', fread(fid,1,'float32'));             %User Variable 25
0261 im_hdr = setfield(im_hdr, 'user26', fread(fid,1,'float32'));             %User Variable 26
0262 im_hdr = setfield(im_hdr, 'user27', fread(fid,1,'float32'));             %User Variable 27
0263 im_hdr = setfield(im_hdr, 'user28', fread(fid,1,'float32'));             %User Variable 28
0264 im_hdr = setfield(im_hdr, 'user29', fread(fid,1,'float32'));             %User Variable 29
0265 im_hdr = setfield(im_hdr, 'user30', fread(fid,1,'float32'));             %User Variable 30
0266 im_hdr = setfield(im_hdr, 'user31', fread(fid,1,'float32'));             %User Variable 31
0267 im_hdr = setfield(im_hdr, 'user32', fread(fid,1,'float32'));             %User Variable 32
0268 im_hdr = setfield(im_hdr, 'user33', fread(fid,1,'float32'));             %User Variable 33
0269 im_hdr = setfield(im_hdr, 'user34', fread(fid,1,'float32'));             %User Variable 34
0270 im_hdr = setfield(im_hdr, 'user35', fread(fid,1,'float32'));             %User Variable 35
0271 im_hdr = setfield(im_hdr, 'user36', fread(fid,1,'float32'));             %User Variable 36
0272 im_hdr = setfield(im_hdr, 'user37', fread(fid,1,'float32'));             %User Variable 37
0273 im_hdr = setfield(im_hdr, 'user38', fread(fid,1,'float32'));             %User Variable 38
0274 im_hdr = setfield(im_hdr, 'user39', fread(fid,1,'float32'));             %User Variable 39
0275 im_hdr = setfield(im_hdr, 'user40', fread(fid,1,'float32'));             %User Variable 40
0276 im_hdr = setfield(im_hdr, 'user41', fread(fid,1,'float32'));             %User Variable 41
0277 im_hdr = setfield(im_hdr, 'user42', fread(fid,1,'float32'));             %User Variable 42
0278 im_hdr = setfield(im_hdr, 'user43', fread(fid,1,'float32'));             %User Variable 43
0279 im_hdr = setfield(im_hdr, 'user44', fread(fid,1,'float32'));             %User Variable 44
0280 im_hdr = setfield(im_hdr, 'user45', fread(fid,1,'float32'));             %User Variable 45
0281 im_hdr = setfield(im_hdr, 'user46', fread(fid,1,'float32'));             %User Variable 46
0282 im_hdr = setfield(im_hdr, 'user47', fread(fid,1,'float32'));             %User Variable 47
0283 im_hdr = setfield(im_hdr, 'user48', fread(fid,1,'float32'));             %User Variable 48
0284 im_hdr = setfield(im_hdr, 'slop_int_6', fread(fid,1,'int32'));         %Integer Slop Field 6
0285 im_hdr = setfield(im_hdr, 'slop_int_7', fread(fid,1,'int32'));         %Integer Slop Field 7
0286 im_hdr = setfield(im_hdr, 'slop_int_8', fread(fid,1,'int32'));         %Integer Slop Field 8
0287 im_hdr = setfield(im_hdr, 'slop_int_9', fread(fid,1,'int32'));         %Integer Slop Field 9
0288 im_hdr = setfield(im_hdr, 'mr_padding', fread(fid,32,'uchar'));    %Spare Space
0289 
0290 return

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003