Tools for bi- multiple exponential decay of a MRI pixel
이전 댓글 표시
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
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]
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
2014년 6월 3일
Henric Rydén
2014년 6월 3일
편집: Henric Rydén
2014년 6월 3일
I don't know what you mean with the binary equation, but you get the fitted parameters from f after you applied your fit:
f = fit(x,y,g);
disp(f.a0)
Load the image with dicomread . To read the header, use dicominfo . The image you sent me is a 256-by-256 that contains only one echo, you need more echoes to do this analysis.
Christoph
2014년 6월 3일
Henric Rydén
2014년 6월 4일
편집: Henric Rydén
2014년 6월 4일
No problem. This is a different question from your original one and you should post it separately next time. Once you've loaded your images in a 3D matrix A:
figure;
imshow(A(:,:,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);
Christoph
2014년 6월 4일
Henric Rydén
2014년 6월 4일
Are you asking how you load the images into A?
Christoph
2014년 6월 6일
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,[]);
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!