0001 function pix_hdr = read_pixel_header(fid, byte_align)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 pix_hdr = struct('img_magic', fread(fid,1,'int32'));
0013 pix_hdr = setfield(pix_hdr, 'img_hdr_length', fread(fid,1,'int32'));
0014
0015 pix_hdr = setfield(pix_hdr, 'img_width', fread(fid,1,'int32'));
0016 pix_hdr = setfield(pix_hdr, 'img_height', fread(fid,1,'int32'));
0017 pix_hdr = setfield(pix_hdr, 'img_depth', fread(fid,1,'int32'));
0018 pix_hdr = setfield(pix_hdr, 'img_compress', fread(fid,1,'int32'));
0019 pix_hdr = setfield(pix_hdr, 'img_dwindow', fread(fid,1,'int32'));
0020 pix_hdr = setfield(pix_hdr, 'img_dlevel', fread(fid,1,'int32'));
0021 pix_hdr = setfield(pix_hdr, 'img_bgshade', fread(fid,1,'int32'));
0022 pix_hdr = setfield(pix_hdr, 'img_ovrflow', fread(fid,1,'int32'));
0023 pix_hdr = setfield(pix_hdr, 'img_undflow', fread(fid,1,'int32'));
0024 pix_hdr = setfield(pix_hdr, 'img_top_offset', fread(fid,1,'int32'));
0025 pix_hdr = setfield(pix_hdr, 'img_bot_offset', fread(fid,1,'int32'));
0026 pix_hdr = setfield(pix_hdr, 'img_version', fread(fid,1,'int16'));
0027 if byte_align, fseek(fid,2,0); end
0028 pix_hdr = setfield(pix_hdr, 'img_checksum', fread(fid,1,'uint16'));
0029 pix_hdr = setfield(pix_hdr, 'img_p_id', fread(fid,1,'int32'));
0030 pix_hdr = setfield(pix_hdr, 'img_l_id', fread(fid,1,'int32'));
0031 pix_hdr = setfield(pix_hdr, 'img_p_unpack', fread(fid,1,'int32'));
0032 pix_hdr = setfield(pix_hdr, 'img_l_unpack', fread(fid,1,'int32'));
0033 pix_hdr = setfield(pix_hdr, 'img_p_compress', fread(fid,1,'int32'));
0034 pix_hdr = setfield(pix_hdr, 'img_l_compress', fread(fid,1,'int32'));
0035 pix_hdr = setfield(pix_hdr, 'img_p_histo', fread(fid,1,'int32'));
0036 pix_hdr = setfield(pix_hdr, 'img_l_histo', fread(fid,1,'int32'));
0037 pix_hdr = setfield(pix_hdr, 'img_p_text', fread(fid,1,'int32'));
0038 pix_hdr = setfield(pix_hdr, 'img_l_text', fread(fid,1,'int32'));
0039 pix_hdr = setfield(pix_hdr, 'img_p_graphics', fread(fid,1,'int32'));
0040 pix_hdr = setfield(pix_hdr, 'img_l_graphics', fread(fid,1,'int32'));
0041 pix_hdr = setfield(pix_hdr, 'img_p_dbHdr', fread(fid,1,'int32'));
0042 pix_hdr = setfield(pix_hdr, 'img_l_dbHdr', fread(fid,1,'int32'));
0043 pix_hdr = setfield(pix_hdr, 'img_levelOffset', fread(fid,1,'int32'));
0044
0045 pix_hdr = setfield(pix_hdr, 'img_p_user', fread(fid,1,'int32'));
0046 pix_hdr = setfield(pix_hdr, 'img_l_user', fread(fid,1,'int32'));
0047
0048 return