display of curve information matlab
1 view (last 30 days)
Show older comments
hi everyone, i use this code :
rep = uigetdir;
Imgs = dir(rep);
thisname = Imgs(3).name;
[path,name,ext]=fileparts(thisname);
ext=strcat('*',ext);
chemin = fullfile(rep,ext);
list = dir(chemin);
nbr_images= numel(list);
for n=1:25
k=dicomread(fullfile(rep, list(n).name));
end;
IM=double(k);
figure(1),imshow(IM,[]);
impixelinfo;
[xi1,yi1] = getpts()
[xi2,yi2] = getpts()
[xi3,yi3] = getpts()
[xi4,yi4] = getpts()
[xi5,yi5] = getpts()
[xi6,yi6] = getpts()
x1= round(xi1);
y1= round(yi1);
x2= round(xi2);
y2= round(yi2);
x3= round(xi3);
y3= round(yi3);
x4= round(xi4);
y4= round(yi4);
x5= round(xi5);
y5= round(yi5);
x6= round(xi6);
y6= round(yi6);
IM=dicomread(fullfile(rep, list(1).name))
IM(1,1,numel(list))=0; %extend array to fit all slices
for n=2:numel(list)
IM(:,:,n)=dicomread(fullfile(rep, list(n).name));
end
for n=1:25
X1=squeeze(IM(x1,y1,:));
X2=squeeze(IM(x2,y2,:));
X3=squeeze(IM(x3,y3,:));
X4=squeeze(IM(x4,y4,:));
X5=squeeze(IM(x5,y5,:));
X6=squeeze(IM(x6,y6,:));
figure(1),plot(X1,'b*-');
xlabel('Cycle cardiaque');
ylabel('intensité');
title('Courbe six segments');
set(gca,'Xtick',1:1:25);
set(gca,'Ytick',0:10:255);
hold on; plot(X2,'y*-'); plot(X3,'r*-'); plot(X4,'g*-'); plot(X5,'m*-'); plot(X6,'k*-');hold off;
end
I get this curve:
i wand to add this :
any help?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Display Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!