Tools for bi- multiple exponential decay of a MRI pixel

15 visualizaciones (últimos 30 días)
Christoph
Christoph el 2 de Jun. de 2014
Comentada: Henric Rydén el 9 de Jun. de 2014
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

Respuestas (2)

Henric Rydén
Henric Rydén el 2 de Jun. de 2014
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 comentario
Christoph
Christoph el 3 de Jun. de 2014
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));

Iniciar sesión para comentar.


Henric Rydén
Henric Rydén el 3 de Jun. de 2014
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 comentarios
Christoph
Christoph el 6 de Jun. de 2014
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 el 9 de Jun. de 2014
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,[]);

Iniciar sesión para comentar.

Categorías

Más información sobre 3-D Volumetric Image Processing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by