Effacer les filtres
Effacer les filtres

How to open .img or .hdr image

5 vues (au cours des 30 derniers jours)
mohd akmal masud
mohd akmal masud le 5 Sep 2023
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:

Réponse acceptée

Walter Roberson
Walter Roberson le 5 Sep 2023
  2 commentaires
mohd akmal masud
mohd akmal masud le 5 Sep 2023
Are you sure this is is. nii format?
mohd akmal masud
mohd akmal masud le 5 Sep 2023
Modifié(e) : mohd akmal masud le 5 Sep 2023
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)

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by