1818 % getDescription - returns the description of the comparison
1919 % getAnalysisClass - returns the class of the analysis
2020 %
21- % See also Comparison, AnalysisCON_BUT, MeasurementCON_BUT, RandomComparisonCON_BUT.
21+ % ComparisonCON_BUT plot methods (Static):
22+ % getComparisonSettingsPanel - returns a UIPanel
23+ %
24+ % See also Comparison, AnalysisCON_BUT, MeasurementCON_BUT, RandomComparisonCON_BUT.
2225
2326 properties (Access = protected )
2427 threshold % threshold of the values
2528 end
2629 methods % Constructor
2730 function c = ComparisonCON_BUT(id , label , notes , atlas , measure_code , group_1 , group_2 , varargin )
28- % ComparisonCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP_1, GROUP_2, 'threshold', THRESHOLD)
31+ % ComparisonCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP_1, GROUP_2, 'threshold', THRESHOLD)
2932 % creates a comparison with ID, LABEL, ATLAS and MEASURE_CODE
3033 % between the data from GROUP_1 and GROUP_2. The data will have
3134 % a fixed THRESHOLD.
3235 %
33- % ComparisonCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP_1, GROUP_2)
36+ % ComparisonCON_BUT(ID, LABEL, NOTES, ATLAS, MEASURE_CODE, GROUP_1, GROUP_2)
3437 % creates a comparison with ID, LABEL, ATLAS and MEASURE_CODE
3538 % between the data from GROUP_1 and GROUP_2. The data will have
3639 % a fixed default THRESHOLD.
@@ -69,7 +72,7 @@ function setThreshold(c, threshold)
6972 function class = getClass()
7073 % GETCLASS returns the class of connectivity comparison
7174 %
72- % ANALYSIS_CLASS = GETCLASS(ANALYSIS) returns the class of
75+ % ANALYSIS_CLASS = GETCLASS(ANALYSIS) returns the class of
7376 % comparison. In this case 'ComparisonCON_BUT'.
7477 %
7578 % See also getList, getName, getDescription.
@@ -86,7 +89,7 @@ function setThreshold(c, threshold)
8689 name = ' Comparison Connectivity BUT' ;
8790 end
8891 function description = getDescription()
89- % GETDESCRIPTION returns the description of connectivity comparison
92+ % GETDESCRIPTION returns the description of connectivity comparison
9093 %
9194 % DESCRIPTION = GETDESCRIPTION() returns the description
9295 % of ComparisonCON_BUT.
@@ -100,7 +103,7 @@ function setThreshold(c, threshold)
100103 ];
101104 end
102105 function analysis_class = getAnalysisClass()
103- % GETANALYSISCLASS returns the class of the analsysis
106+ % GETANALYSISCLASS returns the class of the analsysis
104107 %
105108 % ANALYSIS_CLASS = GETANALYSISCLASS() returns the class of the
106109 % analysis the comparison is part of, 'AnalysisCON_BUT'.
@@ -110,4 +113,88 @@ function setThreshold(c, threshold)
110113 analysis_class = ' AnalysisCON_BUT' ;
111114 end
112115 end
116+ methods (Static ) % Plot MeasurementGUI Child Panel
117+ function handle = getComparisonSettingsPanel(analysis , uiparent ) % #ok<INUSL>
118+ % GETCHILDPANEL returns a dynamic UIPanel
119+ %
120+ % HANDLE = GETCHILDPANEL(ANALYSIS, UIPARENT) returns a dynamic
121+ % UIPanel. Modificable settings are: Verbose, Interruptible,
122+ % Permutation and Threshold.
123+ %
124+ % See also ComparisonST_BUT.
125+
126+ set(uiparent , ' Visible' , ' on' )
127+ ui_threshold_text = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' text' );
128+ ui_threshold_edit = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' edit' );
129+ ui_threshold_min_text = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' text' );
130+ ui_threshold_min_edit = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' edit' );
131+ ui_threshold_max_text = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' text' );
132+ ui_threshold_max_edit = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' edit' );
133+ ui_permutation_text = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' text' );
134+ ui_permutation_edit = uicontrol(' Parent' , uiparent , ' Units' , ' normalized' , ' Style' , ' edit' );
135+ init_child_panel()
136+ function init_child_panel()
137+ set(ui_threshold_text , ' String' , ' Threshold' )
138+ set(ui_threshold_text , ' Position' , [.01 .65 .47 .08 ])
139+ set(ui_threshold_text , ' Fontweight' , ' bold' )
140+
141+ set(ui_threshold_edit , ' String' , 0.1 )
142+ set(ui_threshold_edit , ' Position' , [.5 .67 .45 .08 ])
143+ set(ui_threshold_edit , ' Callback' , {@cb_comparison_threshold })
144+
145+ set(ui_threshold_min_text , ' String' , ' Min' )
146+ set(ui_threshold_min_text , ' Position' , [.01 .75 .47 .08 ])
147+ set(ui_threshold_min_text , ' Fontweight' , ' bold' )
148+
149+ set(ui_threshold_min_edit , ' String' , - 1 )
150+ set(ui_threshold_min_edit , ' Position' , [.5 .77 .45 .08 ])
151+ set(ui_threshold_min_edit , ' Callback' , {@cb_comparison_min })
152+
153+ set(ui_threshold_max_text , ' String' , ' Max' )
154+ set(ui_threshold_max_text , ' Position' , [.01 .55 .47 .08 ])
155+ set(ui_threshold_max_text , ' Fontweight' , ' bold' )
156+
157+ set(ui_threshold_max_edit , ' String' , 1 )
158+ set(ui_threshold_max_edit , ' Position' , [.5 .57 .45 .08 ])
159+ set(ui_threshold_max_edit , ' Callback' , {@cb_comparison_max })
160+
161+ set(ui_permutation_text , ' String' , ' Perumtation Number' )
162+ set(ui_permutation_text , ' Position' , [.01 .85 .47 .08 ])
163+ set(ui_permutation_text , ' Fontweight' , ' bold' )
164+
165+ set(ui_permutation_edit , ' String' , 1000 )
166+ set(ui_permutation_edit , ' Position' , [.5 .87 .45 .08 ])
167+ set(ui_permutation_edit , ' Callback' , {@cb_comparison_permutation })
168+
169+ end
170+ function cb_comparison_threshold(~,~)
171+ setappdata(uiparent , ' threshold' , ...
172+ str2double(get(ui_threshold_min_edit , ' String' )) : ...
173+ str2double(get(ui_threshold_edit , ' String' )) : ...
174+ str2double(get(ui_threshold_max_edit , ' String' )))
175+ end
176+ function cb_comparison_min(src , ~)
177+ newdata = get(src , ' String' );
178+ set(ui_threshold_min_edit , ' String' , newdata );
179+ end
180+ function cb_comparison_max(src , ~)
181+ newdata = get(src , ' String' );
182+ set(ui_threshold_max_edit , ' String' , newdata );
183+ end
184+ function cb_comparison_permutation(~, ~)
185+ setappdata(uiparent , ' permutation' , str2double(get(ui_permutation_edit , ' String' )))
186+ end
187+
188+ handle.variables = {' threshold' };
189+ handle.step = ui_threshold_edit ;
190+ handle.min = ui_threshold_min_edit ;
191+ handle.max = ui_threshold_max_edit ;
192+ handle.permutation = ui_permutation_edit ;
193+ setappdata(uiparent , ' threshold' , ...
194+ str2double(get(ui_threshold_min_edit , ' String' )) : ...
195+ str2double(get(ui_threshold_edit , ' String' )) : ...
196+ str2double(get(ui_threshold_max_edit , ' String' )))
197+ setappdata(uiparent , ' permutation' , str2double(get(ui_permutation_edit , ' String' )))
198+ end
199+ end
113200end
0 commit comments