forked from SnPM-toolbox/SnPM-devel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snpm_combo.m
132 lines (105 loc) · 3.9 KB
/
snpm_combo.m
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
function varargout=snpm_combo(Action)
% SnPM Combo: An SnPM toolbox for combined cluster-voxel tests
%
% This is a beta version with ABSOLUTELY NO WORRANTY, still
% being tested.
%
% For more detailed descriptions of the combined tests, please
% refer to our manuscript
% http://www.sph.umich.edu/fni-stat/Docs/Combo.pdf
%
% This toolbox requires SnPM99 in addition to SPM99. To use this
% toolbox, you should run the "Setup" and "Compute" steps for
% SnPM first. Then use this toolbox's "ComboResults" button
% instead of SnPM's "Results" button to assess the results
% with combined tests.
%
%------------------------------------------------------------------
% Based on snpm.m v2.4 Andrew Holmes & Thomas Nichols
% @(#)snpm_combo.m 3.5 Satoru Hayasaka 04/07/02
% $Id: snpm_combo.m,v 8.1 2009/01/29 15:02:57 nichols Exp $
%-Format arguments
%-----------------------------------------------------------------------
if nargin == 0, Action='Init'; end
if strcmpi(Action,'Init')
%=======================================================================
global MODALITY
if isempty(spm_figure('FindWin','Menu'))
snpm
clc
else
clc
end
snpm_defaults;
snpm_combo('AsciiWelcome')
spm_help('!Disp','snpm_combo.m','','Graphics')
snpm_combo('CreateMenuWin')
elseif strcmpi(Action,'AsciiWelcome')
%=======================================================================
disp( ' SnPM Combo Toolbox ')
disp( ' -----------------------------------------------------')
disp( ' A combined test toolbox for SnPM ')
disp( ' Starting up ....................... ')
fprintf('\n')
elseif strcmpi(Action,'CreateMenuWin')
%=======================================================================
%close(findobj(get(0,'Children'),'Tag','SnPM Menu'))
%-Open SnPM menu window
%-----------------------------------------------------------------------
S = get(0,'ScreenSize');
F = figure('Color',[1 1 1]*.8,...
'Name','SnPM Combo',...
'NumberTitle','off',...
'Position',[S(3)/2-200,S(4)/2-140-230,300,200],...
'Resize','off',...
'Tag','SnPM Combo',...
'Pointer','Watch',...
'MenuBar','none',...
'Visible','off');
%-Frames and text
%-----------------------------------------------------------------------
axes('Position',[0 0 80/300 280/280],'Visible','Off')
text(0.20,0.535,'SnPM',...
'FontName','Times','FontSize',24,...
'Rotation',90,...
'Color',[1 1 1]*.6);
text(0.4,0.8,'Combo',...
'FontName','Times','FontSize',64,...
'Color',[1 1 1]*.6);
text(0.45,0.575,'Combined Test Toolbox',...
'FontName','Times','FontSize',16,'FontAngle','Italic',...
'FontWeight','Bold',...
'Color',[1 1 1]*.6);
uicontrol(F,'Style','Frame','Position',[010 010 280 080],...
'BackgroundColor',snpm_combo('Colour'));
uicontrol(F,'Style','Frame','Position',[020 020 260 060]);
%-Buttons to launch SnPM functions
%-----------------------------------------------------------------------
uicontrol(F,'String','Combined Results',...
'Position',[030 035 130 030],...
'CallBack','snpm_combo_pp',...
'Interruptible','on',...
'ForegroundColor','k');
uicontrol(F,'String','?',...
'Position',[165 035 030 030],...
'CallBack','spm_help(''snpm_combo.man'')',...
'Interruptible','on',...
'ForegroundColor','g');
uicontrol(F,'String','Close',...
'Position',[200 035 070 030],...
'CallBack','close(gcf)',...
'ForegroundColor','r');
set(F,'Pointer','Arrow','Visible','on')
elseif strcmpi(Action,'Colour')
%=======================================================================
% snpm_combo('Colour')
%-----------------------------------------------------------------------
% %-Developmental livery
varargout = {[0.7,1.0,0.7], 'Lime Green'};
%-Distribution livery
%varargout = {[0.8 0.8 1.0], 'Diluted Blackcurrent Purple'};
else
%=======================================================================
error('SnPM:UnknownAction', 'Unknown action string')
%=======================================================================
end