gaussian and rayleigh distribution MRI Late Enhancement

3 次查看(过去 30 天)
Hello,
I am stuck with mri images that is why I ask for help.
I want to make Rayleigh and Gaussian distribution of intensities of the image and then fit it to the histogram but it does not work.
Below you can find my example and sample of code:
clc; clear all; close all;
I=dicomread('image.dcm'); I=uint8(round(double (I)));
I=I(:)'; [muhat, sigmahat]=normfit(I); mean_value=round(muhat); sigma_value=round(sigmahat);
x=0:1:29952; for i=1:size(x')
gauss(i)=100*exp( - (x(i)-mean_value)^2/(2*sigma_value^2)/(sigma_value*sqrt(2*pi)));
end
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)
THANK YOU for your help in advance
  1 个评论
Ryan
Ryan 2012-5-31
Have you looked into using adapthisteq(Image,'Distribution','rayleigh')? There are additional settings and distributions. It is Contrast-Limited Adaptive Histogram Equalization (CLAHE). You can change the tile size that it filters the image at and the number of bins for color choices it can have in addition to some other things. I'm not sure if that will help you or not.
http://www.mathworks.com/help/toolbox/images/ref/adapthisteq.html
and
http://www.mathworks.com/help/toolbox/images/ref/adapthisteq.html#bqkqi21

请先登录,再进行评论。

回答(1 个)

Stephen
Stephen 2012-5-31
[c1, c2] = hist(I(:), 50);
f=fit(c2', c1', 'gauss1');
or for the rayleigh, you'd have to specify it in fittype where 'gauss1' is
f contains a structured variable with the amplitude, mean and std for the gausian, but for the rayleigh it should just be sigma and the amplitude.
you do not need a for loop to create the distribution curves. simply put c2 in place of x(i) and replace 100, 500 with the fit amplitude, and the mean/sigmas with their corresponding fit values. i.e.
gauss=f.a*exp( - (c2-f.b).^2/ (2*f.c^2) );
rayl should be similar. then,
hist(I(:),50),hold on, plot(c2,gauss,c2,rayl)
  1 个评论
A-J KHAN
A-J KHAN 2016-7-10
Dear i am using the same technique for cardiac MRI can u plz helping me... my ID is amjadkhan_cs@yahoo.com waiting for u r responce

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by