imellipse not working for updated images
Mostra commenti meno recenti
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 Commento
Suki Sandhu
il 26 Gen 2017
Modificato: Suki Sandhu
il 26 Gen 2017
Risposte (0)
Categorie
Scopri di più su Region and Image Properties in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!