필터 지우기
필터 지우기

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 CenterFile Exchange에서 Display Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by