Tools for bi- multiple exponential decay of a MRI pixel

조회 수: 17 (최근 30일)
Christoph
Christoph 2014년 6월 2일
댓글: Henric Rydén 2014년 6월 9일
Hello Folk!
I would be really happy if someone could help me to solve this problem. A MRI dataset should be analysed according to the T2 FID and displayed within a bi or multiple exponential decay diagram (time vs. intensity).
My professor says, he does not know where but there should be programs within MATLAB. Therefore I would like to know if there are programs for that or how to construct a new script for that?
Probably you can help me?
Thanks in advance for all useful answers, Chris

답변 (2개)

Henric Rydén
Henric Rydén 2014년 6월 2일
use fittype to create your fittype object, and pass that to the fit command. Something like this
g = fittype('a0*exp(-x/t2)','coefficients',{'a0','t2'});
f = fit(x,y,g);
You will likely need to set limits on your model. Here is an example where I limit a0 between 0 and +Inf, and t2 between 10 and 50:
opts = fitoptions(g)
opts.Upper = [Inf 50]
opts.Lower = [0 10]
  댓글 수: 1
Christoph
Christoph 2014년 6월 3일
Okay thanks for your answer. :) Your example shows me a mono exponential decay. However I would need at least a bi - exponential decay.
I have this piece of code where I have to implement the values (times and intensities of a selected pixel). Afterwards it should work.
However I stuck at the point to figure out how to implement the pixel information of the individual images.
Do you have an idea how?
Piece of code: function d=myfun(a,x)
I1 = x(1); I2 = x(2);
t1 = x(3); t2 = x(4);
te=a(:,1); I=a=(:,2);
d=[];
for k=1:length(te)
d=[d (I-I1*exp(-te/t1)-I2*exp(-te/t2)) ];
end
end
startingvals=[0.5 0.5 3 4];
f = @(x)myfun(a,x);
options = optimset('lsqnonlin'); options = optimset(options,'Algorithm','levenberg-marquardt','TolFun',1e-9,'TolX',1e-7,'MaxFunEvals',12000,'MaxIter',1000);
[x,resnorm,residual,exitflag] = lsqnonlin(f,startingvals,[],[],options);
%disp(x);
fprintf('I1= %.2f, I2= %.2f \n',x(1),x(2)); fprintf('t1= %.2f, t2= %.2f \n',x(3),x(4));

댓글을 달려면 로그인하십시오.


Henric Rydén
Henric Rydén 2014년 6월 3일
If you want another model, simply change this line
g = fittype('a0*exp(-x/t2)','coefficients',{'a0','t2'});
to something like this
g = fittype('a0*exp(-x/z1) + a1*exp(-x/z2)','coefficients',{'a0','a1','z1','z2'});
I don't know your exact model so adjust it to what you want to do. I tried running your code but there is an error here:
I=a=(:,2);
  댓글 수: 8
Christoph
Christoph 2014년 6월 6일
Sry for the delay in response. It is great to have some help from you. I try to learn and understand.
However I thing I am far away from the solution to couple the output with the binary decay equation? This is the code which I user and I get the following error (watch screenshot in the appendix) clear all close all
clc
loadpath = (pwd);
cd(loadpath)
figure; imshow(loadpath(:,:,1),[]) h = impoint; wait(h); % Double-click the ROI to finish mask = h.createMask; mask = repmat(mask,1,1,size(A,3)); % Make the mask 3D y = A(mask);
Henric Rydén
Henric Rydén 2014년 6월 9일
The error occurs because you are passing a string to the imshow command. You need to load the image first, using dicomread (for DICOM files) or imread (for jpg, png, ...).
A=imread('fileName.IMA');
figure;
imshow(A,[]);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by