function image_edge %IMAGE_EDGE Find the edges of the image. % % IMAGE_EDGE % % % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global I Oldzrange Oldcontrast Oldoffset Oldmap Undofun if isempty(I) return; end if ~isimage setviewmode('TOPVIEW'); showimage; end statusbar('Finding image edges...'); Oldzrange=zrange; Oldcontrast=getcontrast; Oldoffset=getoffset; Oldmap=getmap; zrange([0 1]); setcontrast(0); setoffset(0); setmap(30); setimage(edge(I)); Undofun=['global Oldzrange Oldcontrast Oldoffset Oldmap;zrange(Oldzrange);',... 'setimage(getclipboard,inf,0);setcontrast(Oldcontrast);',... 'setoffset(Oldoffset);setmap(Oldmap);setclipboard([]);']; clearstatusbar; return