1 if Region_right{I} == 0
\r
2 % prompt for an operation - one region only
\r
3 Scr_sz = get(0, 'ScreenSize');
\r
4 New_wind = dialog('Name', 'Choose region(s)', 'Position', ...
\r
5 [Scr_sz(3)*0.3 Scr_sz(4)*0.4 Scr_sz(3)*0.3 Scr_sz(4)*0.1]);
\r
7 k = 0; Ok_button = 0; Interactive = 1;
\r
8 if Show_all_regions{I} % not just active
\r
9 k = Bndred_regions{I};
\r
10 for i=1:Bndred_regions{I}
\r
11 Regions_disp{i} = sprintf('%d', i);
\r
14 for i=1:Bndred_regions{I}
\r
15 if Regions{I}{i}.Private.Active
\r
17 Regions_disp{k} = sprintf('%d', i);
\r
23 Region_right{I} = base2dec(Regions_disp{1}, 10); % to correspond
\r
24 Choice_right = uicontrol('Parent', New_wind);
\r
25 Call_back_right = ...
\r
26 sprintf('Segment_demo(''Right'', %18.16f, %d)', Choice_right, I);
\r
27 set(Choice_right, 'Style', 'Popup', 'String', Regions_disp, ...
\r
28 'Units', 'Normalized', 'Position', [0.55 0.5 0.45 0.5], ...
\r
29 'Callback', Call_back_right);
\r
30 Ok_button = uicontrol('Parent', New_wind, ...
\r
31 'String', 'OK', 'Style', 'Pushbutton', ...
\r
32 'Units', 'Normalized', 'Position', [0.1 0 0.3 0.4]);
\r
35 Callback=sprintf('Segment_demo(''%s'',%d,%d)', 'Cancel operation', 0, I);
\r
36 Cancel_button = uicontrol('Parent', New_wind, ...
\r
37 'String', 'Cancel', 'Style', 'Pushbutton', 'Callback', Callback, ...
\r
38 'Units', 'Normalized', 'Position', [0.6 0 0.3 0.4]);
\r