Roipoly for 3D images
20 ビュー (過去 30 日間)
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?
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.
BW = createMask(h); %BW contains the mask which you just altered.
pos = getPosition(h); %Stores the points in your new mask.
%Close the figure now, and repeat this for the next slice.
h = impoly(gca,pos); %Now pos contains the points from your mask.
Let me know if this works!