How do you calculate the volume of tumor from a series of MRI slices contaning tumor

조회 수: 10 (최근 30일)
Hie, i am a PG student working on a project detection of tumor from a sequence of MRI slices. After detecting the tumor from the slices, i calculate the volume of tumor. can any one help me out with the code for calculating the volume. i have this code for calculating the volume could u help me understand this code. i didnt understand what does "level" mean.
function [tumorvolume,flag] = volumetumor(handles)
% % % handles % % % pause
delxx = handles.delxx;
delyy = handles.delyy;
delzz = handles.delzz;
imagedata = handles.onlytumor;
[nx,ny,nz] = size(imagedata);
level = 3;
tumorvolume = 0.0;
%%imagedata(:,:,1)
for k=1:nz
BW =(imagedata(:,:,k)>level);
total = bwarea(BW);
tumorvolume =tumorvolume+total*delxx*delyy*delzz;
end
tumorvolume; flag =1;

채택된 답변

David Sanchez
David Sanchez 2014년 8월 25일
You have to know the scale of the images.
Once you know the scale (equivalence between pixel-size and mm, for example), you just measure the length and width of the tumor within each slice.
Add up the product of length*width from each slice.
Finally, the volume of the tumor will be the previous summation times the distance between each slice.
Volume = slice_distance*(sum(length*width));
  댓글 수: 1
Sayali Lopez
Sayali Lopez 2014년 8월 25일
편집: Sayali Lopez 2014년 8월 25일
Thanks a lot. This will surely help me. i have this code for calculating the volume could u help me understand this code. i didnt understand what does "level" mean.
function [tumorvolume,flag] = volumetumor(handles)
% % % handles % % % pause
delxx = handles.delxx;
delyy = handles.delyy;
delzz = handles.delzz;
imagedata = handles.onlytumor;
[nx,ny,nz] = size(imagedata);
level = 3;
tumorvolume = 0.0;
%%imagedata(:,:,1)
for k=1:nz
BW =(imagedata(:,:,k)>level);
total = bwarea(BW);
tumorvolume =tumorvolume+total*delxx*delyy*delzz;
end
tumorvolume; flag =1;

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MRI에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by