Revision 53cc9fe3025a68dd7b5ce2faa7ff9d1b1815cae6 authored by nathanCSharris on 08 October 2020, 14:39:32 UTC, committed by GitHub on 08 October 2020, 14:39:32 UTC
final github upload for Takeishi, Yeon et al to elife 100820
2 parent s 45db50e + 2551d23
Raw File
getROIcell.m
function rois = getROIcell

%This allows the user to select ROI polygons on a figure

    rois = cell(0);
    n = 1;
    while(1)  
        [x,y] = ginputwhite;
        if(length(x) == 0)
            break;
        end
        patch(x,y,'r','FaceAlpha',0.49);
        text(x(1),y(1),num2str(n),'Color','g');
        rois = [rois [ x y ] ];
        n = n+1;
    end
    
%     saveas(gcf,['ROI-capture-' datestr(clock,30)],'png');
%     delete(findobj('FaceAlpha',0.49));
%     delete(findobj('Color','g'));
    
end
    
    
        
back to top