MATLAB Answers

Error in the medical image display

2 views (last 30 days)
Sakshi Ahuja
Sakshi Ahuja on 14 Dec 2019
Commented: Sakshi Ahuja on 16 Dec 2019
I am having an image stored in structure array(attached). When I am trying to display the image it is not coming properly (attached). Code used:
V = 2225:1:2225;
N = numel(V);
for kk = 1:N
F = sprintf('%d.mat',V(kk));
S = load(F);
C= S.cjdata.image;
T_1 = squeeze(C);
imshow(T_1);
end

  0 Comments

Sign in to comment.

Accepted Answer

Akira Agata
Akira Agata on 16 Dec 2019
How about the following?
imshow(T_1,[]);
In addition, I believe the line 'T_1 = squeeze(C);' can be deleted.
untitled.png

  1 Comment

Sakshi Ahuja
Sakshi Ahuja on 16 Dec 2019
This resolved my issue and one more solution to this:
T_1=mat2gray(C);
imshow(T_1)
'T_1 = squeeze(C) is deleted.

Sign in to comment.

More Answers (0)

Sign in to answer this question.