How to open .img or .hdr image

16 次查看(过去 30 天)
Dear all,
Anyone can help me to open either one of my image attached?
the format is .img and the other one is .hdr.
supposedly the image like picture below:

采纳的回答

Walter Roberson
Walter Roberson 2023-9-5
  2 个评论
mohd akmal masud
mohd akmal masud 2023-9-5
Are you sure this is is. nii format?
mohd akmal masud
mohd akmal masud 2023-9-5
编辑:mohd akmal masud 2023-9-5
I tried this command, successful..
clc
clear all
close all
sz = [128 128 128];
fname = 'ect_it2.img';
fid = fopen(fname);
data = fread(fid,'*float'); % assuming uint
fclose(fid);
% this is blindly devectorized
% may still be transposed, but i can't tell due to symmetry
% note that data is binarized on a [0 1000] scale in uint16
% so if viewing in a denormalized manner, it'll just appear black
% normalize or rescale it as needed
data = reshape(data,sz);
imshow3D(data)

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by