Using impoly in matlab GUI

조회 수: 4 (최근 30일)
rukhmini
rukhmini 2014년 5월 10일
댓글: rukhmini 2014년 5월 10일
I am using impoly function in MATLAB GUI for a stack of DICOM images to delineate ROI. Firstly, using ROIPOLY I am getting the x,y co-ordinates.The (x,y) co-ordinates are given as input to the impoly function i.e., I am just copying the position in the next slice of image of the stack.The function is giving the points on the image but it is not editable.I am not able to drag the points and modify the ROI. While I am doing the same operation for a single image it is working . Can anyone explain this behavior, and how can i get rid of it?

답변 (1개)

Image Analyst
Image Analyst 2014년 5월 10일
I don't understand. Explain exactly where it is working (draggable points) and where it is not. You say it's working for a single image but not for a DICOM image? When you load an image from a DICOM stack into an axes, is it not a single image at that point? Maybe try calling "cla reset" before calling imshow() and see it that fixes it.
  댓글 수: 1
rukhmini
rukhmini 2014년 5월 10일
Actually I want to design a tool for ground truth preparation. I am loading stack of DICOM images containing more than 100 images. I am loading one image at a time into an axes. So, when I am selecting any ROI from any slice, it should be copied in next slice. Also it should be editable. So, I have tried with the following code and its working.
I = imread('cameraman.tif'); imshow(I);
r = [50; 100; 50; 50];%Coordinates of ROI
c = [50; 100; 100; 50];
initPosition = [r,c];
h = impoly(gca, initPosition);
position = wait(h);
"But when I am using similar code in GUI, ROI using stored coordinates is appearing in next image. But, it was not editable."
position = [xi(1:end)',yi(1:end)'];% xi, yi are Stored coordinates
h = impoly(gca,position);
xy_position = wait(h);% new coordinates after editing

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by