フィルターのクリア

imellipse not working for updated images

1 回表示 (過去 30 日間)
Suki Sandhu
Suki Sandhu 2017 年 1 月 26 日
編集済み: Suki Sandhu 2017 年 1 月 26 日
I have a piece of code that is like this:
h = imellipse(gca);
bwCurr = createMask(h);
and from there taking the mask I decide if a line falls under the mask and change the color of it and shown here: http://imgur.com/a/5oYFj
It works well for the first image, however, when I move onto any of the next images in the stack, this function does not work and throws the following error:
{
Error in CAS_v2>figure1_WindowKeyPressFcn (line 623) h = imellipse(gca); Error in gui_mainfcn (line 95) feval(varargin{:});
Error in CAS_v2 (line 42) gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)CAS_v2('figure1_WindowKeyPressFcn',hObject,eventdata,guidata(hObject))
Error in iptaddcallback/callbackProcessor (line 147) fun(varargin{:});
Error while evaluating Figure WindowKeyPressFcnluating Figure WindowKeyPressFcn
}
The next image is brought up by:
handles.imageAxesFigure=imshow(imadjust(handles.imgStack(:,:,handles.sliceNum),handles.CT_Adjusted_Range));
where the sliceNum indicates what slice to get.
Oddly enough, the roipoly() function works for all the slices - however it is just too slow and involves too many clicks. I am not sure what to do to get it to work for all the slices? Any help/advice/alternative solutions would be very much appreciated. Thanks in advance.
  1 件のコメント
Suki Sandhu
Suki Sandhu 2017 年 1 月 26 日
編集済み: Suki Sandhu 2017 年 1 月 26 日
hmm weird, so I found out about cla('reset') which did the trick for imrect(gca), but for some reason imellipse(gca) still doesnt work. I am completely fine with this though since its just as good. I'd love to know any reasoning behind why this might be just for knowledge purposes, otherwise this question got its answer. :)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDisplay Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by