⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 closeimage.m

📁 matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译
💻 M
字号:
function cl=closeimage%CLOSEIMAGE  Close the actual image%%      K = CLOSEIMAGE%%      Closeimage is the function utilized to close the actual image and%      restore the default condition. It is used from the close menu item and%      it is called before loading a file and before exiting alex.%      The return value K is 1 if the closing was completed or 0 on unsuccess.%      For example 0 is returnded pressing Cancel from the dialog asking that%      the image was modified.%%      Customization:%      Now if you are doing something with a Extrafun, it is possible that you%      want to reset some variables or run another function upon closing the%      image. This can be done setting the global string CloseImageFun to the%      action to take. Infact this function will be evaluated as one of the%      first instruction of closeimage. To clear variables, they must be%      defined global in the Extrafun and in the CloseImageFun. This will%      help to keep the progam more general and easy to costumize.%%        Claudio Aug. 16 (1995)%%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu,    mark@alice.uoregon.edu%global Handleframeax Handleimgax FullFname Note_txt Note_labglobal I H isModify Clipboard ZoomFactor Oldzoomstatusglobal counter TVzrangeglobal CloseImageFun Undofun AutoZrangecl=1;if ~isobj(Handleimgax)   % Image has already been closed return;endif isempty(AutoZrange)  AutoZrange=1;endif isModify > 1  r=alexdlg(['|File: ' FullFname '||              Has been modified.||                   Save it?']);  if strcmp(r, 'Yes')    save_image(FullFname);  end  if strcmp(r, 'Cancel')    cl=0;    return;  endendif isstr(CloseImageFun)  eval(CloseImageFun);endCloseImageFun='';f=watchon;statusbar(['Closing image ' FullFname]);setviewmode('TOPVIEW');TVzrange=[];ZoomFactor=[];Oldzoomstatus=1;imagetitle('');set(Handleframeax, 'ButtonDownFcn', '');setalexmenu('off');%closeviewer;if AutoZrange  clearzrange;enddelete(Handleimgax);if isobj(Note_txt)  delete(Note_txt);endif isobj(Note_lab)  delete(Note_lab);end% Now clear the general global variablesI=[];H=[];setclipboard([]);Undofun='';setzoomstatus(1);clearstatusbar;watchoff(f);return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -