Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Error in Region growing MRI volumetric data.

조회 수: 3 (최근 30일)
Muhammad Shoaib
Muhammad Shoaib 2015년 12월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
Sir i want to segment DICOM stack of 28 slices, for 2D single image segmentation it work fine but for 3D volumetric data it give error, please help me . . .
tolerance = 20;
Igray = double(mri); % mri is series of DICOM images
x = 0;
y = 0;
if(x == 0 || y == 0)
imshow(Igray(:,:,12),[min_level max_level]);
[x,y] = ginput(1); % Selecting the seed point
end
Phi = double(false(size(Igray,1),size(Igray,2)));
ref = double(true(size(Igray,1),size(Igray,2)));
PhiOld = Phi;
Phi(uint8(x),uint8(y)) = 1;
while(sum(Phi(:))) ~= sum(PhiOld(:))
PhiOld = Phi;
segm_val = Igray(Phi);
meanSeg = mean(segm_val);
posVoisinsPhi = imdilate(Phi,strel('disk',1,0)) - Phi;
voisins = find(posVoisinsPhi);
valeursVoisins = Igray(voisins);
Phi(voisins(valeursVoisins > meanSeg - tolerance & valeursVoisins < meanSeg + tolerance)) = 1;
end
imshow(Phi(:,:,12))
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 12월 15일
Please post the complete error message, everything in red.
Muhammad Shoaib
Muhammad Shoaib 2015년 12월 15일
Sir these are the errors which i am getting.
Subscript indices must either be real positive integers or logicals.
Error in segCroissRegion (line 59) segm_val = Igray(Phi);

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by