Rayleigh and Gaussian gaussian and rayleigh distribution MRI Late Enhancement for cardiac images
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
A-J KHAN
el 13 de Jul. de 2016
Editada: Walter Roberson
el 16 de Jul. de 2016
Hello
i found this code on Mathworks.com, when i run this code for my cardiac LV image then i face withe this type of problem. plz i need help here
my id:amjadkhan_cs@yahoo.com
Error using .*
Integers can only be combined with integers of the same class, or scalar doubles.
Error in linspace (line 30)
y = d1 + (0:n1).*(d2 - d1)/n1;
Error in hist (line 94)
edges = linspace(miny,maxy,x+1);
Error in dd (line 13)
[c1,c2]=hist(I(:)',50);"
clear;clear all;close all;
I=dicomread('IM_0001.dcm');
I=uint8(round(double (I)));
I=I(:)',[muhat, sigmahat]=normfit(I);
mean_value=round(muhat);
sigma_value=round(sigmahat);
gauss(i)=100*exp( - (x(i)-mean_value)^2/(2*sigma_value^2)/(sigma_value*sqrt(2*pi)));
%5end
%%x=0:1:29952; for i=1:size(x')
rayl(i)=500*exp( - (x(i)^2/(2*sigma_value^2)*(x(i)/sigma_value^2)));
%%end
%%figure(3),plot(x,gauss, x,rayl),hold on imhist(I)
[c1,c2]=hist(I(:)',50);
f=fit(c2', c1', 'gauss1');
gauss=f.a*exp( - (c2-f.b).^2/ (2*f.c^2) );
hist(I(:),50),hold on, plot(c2,gauss,c2,rayl)
0 comentarios
Respuesta aceptada
Walter Roberson
el 13 de Jul. de 2016
Change the
hist(I(:),50)
to
hist(double(I(:)),50)
7 comentarios
Walter Roberson
el 15 de Jul. de 2016
I cannot proceed on this until you post max(I(:)) and min(I(:)) right after reading the .dcm file. .jpg files are not the same as .dcm files.
By the way: you need a comma before the imhist(I) .
I also firmly recommend that you use semi-colon instead of comma after I=I(:)'
A-J KHAN
el 16 de Jul. de 2016
Editada: Walter Roberson
el 16 de Jul. de 2016
Más respuestas (1)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!