fn_mouse
Contents
Syntax
poly = fn_mouse([axes handle],'point|cross|poly|free|ellipse'[,msg]) [x y] = fn_mouse([axes handle],'point|cross'[,msg]) rect = fn_mouse([axes handle],'rect'[,msg]) [center axis e] = fn_mouse([axes handle],'ellipse'[,msg]) [center axis e relradius] = fn_mouse([axes handle],'ring'[,msg])
Description
multi-functions function using mouse events mode defines action: 'point' [default] get coordinates on mouse click 'cross' get coordinates on mouse click - use cross pointer 'rect' get a rectangle selection (format [xstart ystart xsize ysize]) 'rectax' get a rectangle selection (format [xstart xend ystart yend]) 'rectangle' get a rectangle selection (format [x1 x2 x3 x4; y1 y2 y3 y4]) 'poly' polygone selection 'line' or 'segment' single line segment 'xsegment', 'ysegment' a segment in x or y (formag [start end]) 'free' free-form drawing 'ellipse' circle or ellipse 'ring' circular or elliptic ring options: (ex: 'rect+', 'poly-@:.25:') + selection is drawn (all modes) - use as first point the current point in axes (rect, poly, free, ellipse) @ closes polygon or line (poly, free, spline) ^ enable escape: cancel current selection if a second key is pressed :num: interpolates line with one point every 'num' pixel (poly, free, ellipse) for 'ellipse' mode, if :num; is not specified, output is a cell array {center axis e} event in the case of only one outpout argument
See also fn_maskselect, interactivePolygon
Source
Thomas Deneux
Copyright 2005-2017