Changeset 854 for trunk/src/series/civ_input.m
- Timestamp:
- Jan 21, 2015, 7:02:04 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_input.m
r853 r854 257 257 set(handles.dt_unit,'String',['dt in m' TimeUnit]);%display dt in unit 10-3 of the time (e.g ms) 258 258 set(handles.TimeUnit,'String',TimeUnit); 259 set(handles.CoordUnit,'String',CoordUnit)259 %set(handles.CoordUnit,'String',CoordUnit) 260 260 set(handles.SearchRange,'UserData', pxcm_search); 261 261 … … 988 988 set(handles.num_VMin,'Visible','on') 989 989 set(handles.num_VMax,'Visible','on') 990 set(handles.CoordUnit,'Visible','on')991 set(handles.TimeUnit,'Visible','on')992 set(handles.slash_title,'Visible','on')990 %set(handles.CoordUnit,'Visible','on') 991 %set(handles.TimeUnit,'Visible','on') 992 %set(handles.slash_title,'Visible','on') 993 993 set(handles.min_title,'Visible','on') 994 994 set(handles.max_title,'Visible','on') … … 1023 1023 end 1024 1024 if ~(isempty(umin)||isempty(umax)||isempty(vmin)||isempty(vmax)) 1025 list_pair=get(handles.ListPairCiv1,'String');%get the menu of image pairs1026 index=get(handles.ListPairCiv1,'Value');1027 pair_string=list_pair{index};1028 time=get(handles.TimeSource,'UserData'); %get the set of times1029 pxcm=get(handles.SearchRange,'UserData');1030 mode_list=get(handles.ListPairMode,'String');1031 mode_value=get(handles.ListPairMode,'Value');1032 mode=mode_list{mode_value};1033 if isequal (mode, 'series(Di)' )1034 ref_i=str2double(get(handles.ref_i,'String'));1035 num1=ref_i-floor(index/2);% first image numbers1036 num2=ref_i+ceil(index/2);1037 num_a=1;1038 num_b=1;1039 elseif isequal (mode, 'series(Dj)')1040 num1=1;1041 num2=1;1042 ref_j=str2double(get(handles.ref_j,'String'));1043 num_a=ref_j-floor(index/2);% first image numbers1044 num_b=ref_j+ceil(index/2);1045 elseif isequal(mode,'pair j1-j2') %case of bursts (png_old or png_2D)1046 ref_i=str2double(get(handles.ref_i,'String'));1047 num1=ref_i;1048 num2=ref_i;1049 r=regexp(pair_string,'(?<mode>(Di=)|(Dj=)) -*(?<num1>\d+)\|(?<num2>\d+)','names');1050 if isempty(r)1051 r=regexp(pair_string,'(?<num1>\d+)(?<mode>-)(?<num2>\d+)','names');1052 end1053 num_a=str2num(r.num1);1054 num_b=str2num(r.num2);1055 end1056 dt=time(num2+1,num_b+1)-time(num1+1,num_a+1);1057 ibx=str2double(get(handles.num_CorrBoxSize_1,'String'));1058 iby=str2double(get(handles.num_CorrBoxSize_2,'String'));1059 umin=dt*pxcm*umin;1060 umax=dt*pxcm*umax;1061 vmin=dt*pxcm*vmin;1062 vmax=dt*pxcm*vmax;1025 % list_pair=get(handles.ListPairCiv1,'String');%get the menu of image pairs 1026 % index=get(handles.ListPairCiv1,'Value'); 1027 % pair_string=list_pair{index}; 1028 % time=get(handles.TimeSource,'UserData'); %get the set of times 1029 % pxcm=get(handles.SearchRange,'UserData'); 1030 % mode_list=get(handles.ListPairMode,'String'); 1031 % mode_value=get(handles.ListPairMode,'Value'); 1032 % mode=mode_list{mode_value}; 1033 % if isequal (mode, 'series(Di)' ) 1034 % ref_i=str2double(get(handles.ref_i,'String')); 1035 % num1=ref_i-floor(index/2);% first image numbers 1036 % num2=ref_i+ceil(index/2); 1037 % num_a=1; 1038 % num_b=1; 1039 % elseif isequal (mode, 'series(Dj)') 1040 % num1=1; 1041 % num2=1; 1042 % ref_j=str2double(get(handles.ref_j,'String')); 1043 % num_a=ref_j-floor(index/2);% first image numbers 1044 % num_b=ref_j+ceil(index/2); 1045 % elseif isequal(mode,'pair j1-j2') %case of bursts (png_old or png_2D) 1046 % ref_i=str2double(get(handles.ref_i,'String')); 1047 % num1=ref_i; 1048 % num2=ref_i; 1049 % r=regexp(pair_string,'(?<mode>(Di=)|(Dj=)) -*(?<num1>\d+)\|(?<num2>\d+)','names'); 1050 % if isempty(r) 1051 % r=regexp(pair_string,'(?<num1>\d+)(?<mode>-)(?<num2>\d+)','names'); 1052 % end 1053 % num_a=str2num(r.num1); 1054 % num_b=str2num(r.num2); 1055 % end 1056 % dt=time(num2+1,num_b+1)-time(num1+1,num_a+1); 1057 % ibx=str2double(get(handles.num_CorrBoxSize_1,'String')); 1058 % iby=str2double(get(handles.num_CorrBoxSize_2,'String')); 1059 % umin=dt*pxcm*umin; 1060 % umax=dt*pxcm*umax; 1061 % vmin=dt*pxcm*vmin; 1062 % vmax=dt*pxcm*vmax; 1063 1063 shiftx=round((umin+umax)/2); 1064 1064 shifty=round((vmin+vmax)/2); 1065 isx=(umax+2-shiftx)*2+param_civ1. Bx;1065 isx=(umax+2-shiftx)*2+param_civ1.CorrBoxSize(1); 1066 1066 isx=2*ceil(isx/2)+1; 1067 isy=(vmax+2-shifty)*2+param_civ1. Bx;1067 isy=(vmax+2-shifty)*2+param_civ1.CorrBoxSize(2); 1068 1068 isy=2*ceil(isy/2)+1; 1069 1069 set(handles.num_SearchBoxShift_1,'String',num2str(shiftx)); … … 1076 1076 % --- Executes on button press in CheckMask. 1077 1077 function num_CorrSmooth_Callback(hObject, eventdata, handles) 1078 set(hObject,'BackgroundColor',[1 0 1])1079 1078 set(handles.configSource,'String','NEW') 1080 1079 set(handles.configSource,'BackgroundColor',[1 0 1]) 1081 1080 %------------------------------------------------------------------------ 1082 1081 … … 1417 1416 set(hObject,'BackgroundColor',[1 0 1]) 1418 1417 set(handles.configSource,'String','NEW') 1419 1418 set(handles.configSource,'BackgroundColor',[1 0 1]) 1420 1419 %------------------------------------------------------------------------ 1421 1420 % --- Executes on button press in CheckMask: common to all panels (civ1, Civ2..) … … 1461 1460 set(handle_txtbox,'Visible','off') 1462 1461 end 1463 set(hObject,'BackgroundColor',[1 0 1])1464 1462 set(handles.configSource,'String','NEW') 1463 set(handles.configSource,'BackgroundColor',[1 0 1]) 1465 1464 1466 1465 % %------------------------------------------------------------------------ … … 1678 1677 set(obj,'Visible','off') 1679 1678 end 1680 set(hObject,'BackgroundColor',[1 0 1])1681 1679 set(handles.configSource,'String','NEW') 1680 set(handles.configSource,'BackgroundColor',[1 0 1]) 1682 1681 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1683 1682 %%%%%%%%%%%%%% TEST functions … … 2133 2132 ListExclude={'CheckCiv1','CheckFix1','CheckPatch1','CheckCiv2','CheckFix2','CheckPatch2','ref_i'}; 2134 2133 if isempty(find(strcmp(get(gco,'Tag'),ListExclude),1))% if the selected uicontrol is not in the Exclude list 2135 set(gco,'BackgroundColor',[1 0 1])2136 drawnow2137 2134 set(handles.ConfigSource,'String','NEW')% indicate that the configuration is new 2138 end 2135 set(handles.ConfigSource,'BackgroundColor',[1 0 1])% 2136 end
Note: See TracChangeset
for help on using the changeset viewer.