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 Center および File ExchangeDICOM Format についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by