function h = readUPChead(fid) % function h = readUPCline(fid) returns the header of an open upc file fid % as a structure. h.signature=fread(fid,[1 4],'*char'); % Signature of the file format (always UPCf) h.versionMajor=fread(fid,1,'uchar'); % The major version number for the file h.versionMinor=fread(fid,1,'uchar'); % The minor version number for the file h.headerSize=fread(fid,1,'ushort'); % Size of the header block h.numOfPts=fread(fid,1,'*uint64'); % The number of points within the file h.xScale=fread(fid,1,'double'); % The scale used in the x-coord h.yScale=fread(fid,1,'double'); % The scale used in the y-coord h.zScale=fread(fid,1,'double'); % The scale used in the z-coord h.xOffset=fread(fid,1,'double'); % The offset used in the x-coord h.yOffset=fread(fid,1,'double'); % The offset used in the y-coord h.zOffset=fread(fid,1,'double'); % The offset used in the z-coord