# Roipoly for 3D images

조회 수: 10 (최근 30일)
Jacob 2011년 12월 1일
Hello,
I am trying to use the roipoly tool to segment out a region from a stack of medical images. In many cases the ROI is fairly constant between different slices of the total volume. Is there a way to select the ROI in the first slice, copy those points to the adjacent slice, and then edit those points?
Right now I'm trying the following:
[slice_1_roi tmp_xi tmp_yi]=roipoly(slice1);
[slice_2_roi tmp_xi tmp_yi]=roipoly(slice2,tmp_xi,tmp_yi);
[slice_3_roi tmp_xi tmp_yi]=roipoly(slice3,tmp_xi,tmp_yi);...
However, this just copies the ROI from the first slice without allowing any interaction in the next two slices. Help?
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Sean de Wolski 2011년 12월 1일
Good Question.

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

### 채택된 답변

Amith Kamath 2011년 12월 2일
This is interesting too. I had to work on a similar problem of 3D segmentation, where the correlation between slices was significant, although my contours were not manually set for each slice. But you could use the function called impoly. For example,
[slice_1_roi tmp_xi tmp_yi]=roipoly(D(:,:,:,1));
imshow(D(:,:,:,2)); %To get the figure handle.
h = impoly(gca,[tmp_xi tmp_yi]); %Alter your mask here. DONT close the figure window yet.
%Close the figure now, and repeat this for the next slice.
imshow(D(:,:,3));
Let me know if this works!
##### 댓글 수: 2없음 표시없음 숨기기
Jacob 2011년 12월 2일
Great solution, thank you!
Jawahir 2013년 3월 21일
Is this possible in 3D medical image in .obj format? i've already read the file and displayed it in the figure window in mesh form.

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

### 카테고리

Help CenterFile Exchange에서 ROI-Based Processing에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by