Changeset 758 for trunk/src/series/civ_input.m
- Timestamp:
- Apr 29, 2014, 10:11:11 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_input.m
r716 r758 82 82 83 83 %% input file info 84 RootPath=Param.InputTable{1,1};85 % set(handles.RootPath,'String',RootPath)86 RootFile=Param.InputTable{1,3};87 SubDir=Param.InputTable{1,2};84 % RootPath=Param.InputTable{1,1}; 85 % %set(handles.RootPath,'String',RootPath) 86 % RootFile=Param.InputTable{1,3}; 87 % SubDir=Param.InputTable{1,2}; 88 88 NomTypeInput=Param.InputTable{1,4}; 89 FileExt=Param.InputTable{1,5};89 % FileExt=Param.InputTable{1,5}; 90 90 FileType='image';%fdefault 91 91 FileInfo=[]; … … 293 293 hparent=get(hcheckgrid(ilist),'parent');%handles of the parent panel 294 294 hchildren=get(hparent,'children'); 295 handle_txtbox=findobj(hchildren,'tag','Grid');% look for the grid name box in the same panel295 %handle_txtbox=findobj(hchildren,'tag','Grid');% look for the grid name box in the same panel 296 296 handle_dx=findobj(hchildren,'tag','num_Dx'); 297 297 handle_dy=findobj(hchildren,'tag','num_Dy'); … … 901 901 function ListPairCiv2_Callback(hObject, eventdata, handles) 902 902 %------------------------------------------------------------------------ 903 index_pair=get(handles.ListPairCiv2,'Value');%get the selected position index in the menu904 905 % update MinIndex_i and last_i according to the chosen image pairs906 mode_list=get(handles.ListPairMode,'String');907 mode_value=get(handles.ListPairMode,'Value');908 mode=mode_list{mode_value};909 if isequal(mode,'series(Di)')910 first_i=str2double(get(handles.MinIndex_i,'String'));911 last_i=str2double(get(handles.last_i,'String'));912 incr_i=str2double(get(handles.incr_i,'String'));913 num_i=first_i:incr_i:last_i;914 915 if ~isnan(lastfield)916 test_find=(num_i-floor(index_pair/2)*ones(size(num_i))>0)& ...917 (num_i+ceil(index_pair/2)*ones(size(num_i))<=lastfield);918 num_i=num_i(test_find);919 end920 set(handles.MinIndex_i,'String',num2str(num_i(1)));921 set(handles.last_i,'String',num2str(num_i(end)));922 elseif isequal(mode,'series(Dj)')923 first_j=str2double(get(handles.MinIndex_j,'String'));924 last_j=str2double(get(handles.last_j,'String'));925 incr_j=str2double(get(handles.incr_j,'String'));926 num_j=first_j:incr_j:last_j;927 lastfield2=str2double(get(handles.MaxIndex_j,'String'));928 if ~isnan(lastfield2)929 test_find=(num_j-floor(index_pair/2)*ones(size(num_j))>0)& ...930 (num_j+ceil(index_pair/2)*ones(size(num_j))<=lastfield2);931 num_j=num_j(test_find);932 end933 set(handles.MinIndex_j,'String',num2str(num_j(1)));934 set(handles.last_j,'String',num2str(num_j(end)));935 end903 % index_pair=get(handles.ListPairCiv2,'Value');%get the selected position index in the menu 904 % 905 % %update MinIndex_i and last_i according to the chosen image pairs 906 % mode_list=get(handles.ListPairMode,'String'); 907 % mode_value=get(handles.ListPairMode,'Value'); 908 % mode=mode_list{mode_value}; 909 % if isequal(mode,'series(Di)') 910 % first_i=str2double(get(handles.MinIndex_i,'String')); 911 % last_i=str2double(get(handles.MaxIndex_i,'String')); 912 % incr_i=str2double(get(handles.incr_i,'String')); 913 % num_i=first_i:incr_i:last_i; 914 % % lastfield=str2double(get(handles.MaxIndex_i,'String')); 915 % if ~isnan(last_i) 916 % test_find=(num_i-floor(index_pair/2)*ones(size(num_i))>0)& ... 917 % (num_i+ceil(index_pair/2)*ones(size(num_i))<=last_i); 918 % num_i=num_i(test_find); 919 % end 920 % set(handles.MinIndex_i,'String',num2str(num_i(1))); 921 % set(handles.MaxIndex_i,'String',num2str(num_i(end))); 922 % elseif isequal(mode,'series(Dj)') 923 % first_j=str2double(get(handles.MinIndex_j,'String')); 924 % last_j=str2double(get(handles.last_j,'String')); 925 % incr_j=str2double(get(handles.incr_j,'String')); 926 % num_j=first_j:incr_j:last_j; 927 % lastfield2=str2double(get(handles.MaxIndex_j,'String')); 928 % if ~isnan(lastfield2) 929 % test_find=(num_j-floor(index_pair/2)*ones(size(num_j))>0)& ... 930 % (num_j+ceil(index_pair/2)*ones(size(num_j))<=lastfield2); 931 % num_j=num_j(test_find); 932 % end 933 % set(handles.MinIndex_j,'String',num2str(num_j(1))); 934 % set(handles.last_j,'String',num2str(num_j(end))); 935 % end 936 936 937 937 %------------------------------------------------------------------------ … … 1095 1095 end 1096 1096 1097 %% determine the default selection in the pair menu 1097 %% determine the default selection in the pair menu for Civ1 1098 1098 ichoice=find(select,1);% index of selected pair 1099 1099 if (isempty(ichoice) || ichoice < 1); ichoice=1; end; … … 1102 1102 set(handles.ListPairCiv1,'Value',ichoice);% first valid pair proposed by default in the menu 1103 1103 end 1104 initial=get(handles.ListPairCiv2,'Value'); 1105 if initial>length(displ_pair')%|~isequal(select(initial),1) 1106 if ichoice <= length(displ_pair') 1107 set(handles.ListPairCiv2,'Value',ichoice);% same pair proposed by default for civ2 1108 else 1109 set(handles.ListPairCiv2,'Value',1);% same pair proposed by default for civ2 1110 end 1104 1105 %% determine the default selection in the pair menu for Civ2 1106 if strcmp(get(handles.ListPairCiv2,'Visible'),'on') 1107 initial=get(handles.ListPairCiv2,'Value'); 1108 if initial>length(displ_pair')%|~isequal(select(initial),1) 1109 if ichoice <= length(displ_pair') 1110 set(handles.ListPairCiv2,'Value',ichoice);% same pair proposed by default for civ2 1111 else 1112 set(handles.ListPairCiv2,'Value',1);% same pair proposed by default for civ2 1113 end 1114 end 1115 else 1116 set(handles.ListPairCiv2,'Value',get(handles.ListPairCiv1,'Value'))% initiate the choice of Civ2 as a reproduction of if civ1 1111 1117 end 1112 1118 set(handles.ListPairCiv2,'String',displ_pair'); 1113 set(gcf,'Pointer','arrow') 1119 set(gcf,'Pointer','arrow')% Indicate that the process is finished 1114 1120 1115 1121
Note: See TracChangeset
for help on using the changeset viewer.