-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaedes_killfigs.m
More file actions
54 lines (48 loc) · 1.39 KB
/
aedes_killfigs.m
File metadata and controls
54 lines (48 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
function aedes_killfigs(opt)
% AEDES_KILLFIGS - Close all Matlab figures (also with hidden handles) with brute force
%
%
% Synopsis:
%
% Description:
%
% Examples:
%
% See also:
%
% This function is a part of Aedes - A graphical tool for analyzing
% medical images
%
% Copyright (C) 2006 Juha-Pekka Niskanen <[email protected]>
%
% Department of Physics, Department of Neurobiology
% University of Kuopio, FINLAND
%
% This program may be used under the terms of the GNU General Public
% License version 2.0 as published by the Free Software Foundation
% and appearing in the file LICENSE.TXT included in the packaging of
% this program.
%
% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
if nargin<1
opt = 'all';
end
switch opt
case 'all'
% Get handles to all figures (with hidden and normal handles)
H = findall(0,'type','figure');
fprintf(1,'Killing %d figure(s)...\n',length(H))
delete(H);
case 'aedes'
% Find handles to aedes windows
tags = {'aedes_main_fig','aedes_juigetfiles_main_fig',...
'header_browser_fig','aedes_overlay_controls_fig',...
'aedes_resview_fig','aedes_export_fig'};
for ii=1:length(tags)
h=findall(0,'tag',tags{ii});
delete(h)
end
otherwise
error('Valid input arguments are ''all'' or ''aedes''!')
end