How to open .hdr files (paired with zipped .img files)
26 views (last 30 days)
I have been trying to open several CT images in .hdr format by using the "hdrread" function, but it doesn't seem to work.
These are what the files look like:
Here's the error message that shows up when I use "hdrread":
>> hdr = hdrread('27M01022184.hdr');
Error using hdrread>readHeader (line 65)
Not a Radiance file.
Error in hdrread (line 31)
fileinfo = readHeader(fid);
These are lines from 58 to 66 in the "hdrread" function code:
while (isempty(strfind(header, '#?')) && ~feof(fid))
header = fgetl(fid);
radianceMarker = strfind(header, '#?');
I tried using "hdrread" with sample HDR images that I found online and it worked fine. So could it be the file format problem...? If so, can anyone tell me what the problem is? Would appreciate any form of help!