Changeset 428 for trunk/src/uvmat.m
- Timestamp:
- May 19, 2012, 12:38:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r427 r428 1611 1611 sub_value= get(handles.SubField,'Value'); 1612 1612 if sub_value % a second input file has been entered 1613 [FileName_1,RootPath_1,filebase_1,FileIndices_1,FileExt_1,SubDir_1]=read_file_boxes_1(handles);1614 [tild,tild,tild,i1_1,i2_1,j1_1,j2_1]=fileparts_uvmat( FileIndices_1);1615 1613 [InputFile.RootPath_1,InputFile.SubDir_1,InputFile.RootFile_1,InputFile.FileIndex_1,InputFile.FileExt_1,InputFile.NomType_1]=read_file_boxes_1(handles); 1614 [tild,tild,tild,i1_1,i2_1,j1_1,j2_1]=fileparts_uvmat(InputFile.FileIndex_1); 1615 % InputFile.NomType_1=get(handles.NomType_1,'String'); 1616 1616 else 1617 1617 filename_1=[]; … … 1742 1742 filename=fullfile_uvmat(InputFile.RootPath,InputFile.SubDir,InputFile.RootFile,FileExt,NomType,i1,i2,j1,j2); 1743 1743 if sub_value 1744 filename_1=fullfile_uvmat(InputFile.RootPath_1,InputFile.SubDir_1,InputFile.RootFile_1, FileExt_1,NomType_1,i1_1,i2_1,j1_1,j2_1);1744 filename_1=fullfile_uvmat(InputFile.RootPath_1,InputFile.SubDir_1,InputFile.RootFile_1,InputFile.FileExt_1,InputFile.NomType_1,i1_1,i2_1,j1_1,j2_1); 1745 1745 end 1746 1746 … … 1762 1762 set(handles.j2,'String',num2stra(j2,NomType,2)); 1763 1763 end 1764 % [indices]=name_generator('',i1,j1,'',NomType,1,i2,j2,'');1765 1764 indices=fullfile_uvmat('','','','',NomType,i1,i2,j1,j2); 1766 1765 set(handles.FileIndex,'String',indices); 1767 1766 if ~isempty(filename_1) 1768 indices_1=fullfile_uvmat('','','','',NomType_1,i1_1,i2_1,j1_1,j2_1); 1769 %indices_1=name_generator('',i1_1,j1_1,'',NomType_1,1,i2_1,j2_1,''); 1767 indices_1=fullfile_uvmat('','','','',InputFile.NomType_1,i1_1,i2_1,j1_1,j2_1); 1770 1768 set(handles.FileIndex_1,'String',indices_1); 1771 1769 end … … 2105 2103 end 2106 2104 end 2105 if isequal(get(handles.NomType_1,'Visible'),'on') 2107 2106 NomType_1=get(handles.NomType_1,'String'); 2107 else 2108 NomType_1=get(handles.NomType,'String'); 2109 end 2108 2110 test_keepdata_1=0;% test for keeping the previous stored data if the input files are unchanged 2109 2111 if ~isequal(NomType_1,'*')%in case of a series of files (not avi movie) … … 2638 2640 PlotParam{imap}.Scalar.CheckBW=[]; %B/W option depends on the input field (image or scalar) 2639 2641 if isfield(ObjectData,'CoordUnit') 2640 PlotParam{imap}.Coordinates.CheckFixEqual=1;% set x and y scaling equal if CoordUnit is defined (common unit for x and y) 2642 PlotParam{imap}.Coordinates.CheckFixAspectRatio=1;% set x and y scaling equal if CoordUnit is defined (common unit for x and y) 2643 PlotParam{imap}.Coordinates.AspectRatio=1; %set aspect ratio to 1 2641 2644 end 2642 2645 end … … 2883 2886 indy=1+round((nxy(1)-1)*(y12-rangy0(1))/(rangy0(2)-rangy0(1)));% index y of pixel 2884 2887 2888 2889 %------------------------------------------------------------------- 2890 % --- Executes on button press in 'CheckZoom'. 2891 %------------------------------------------------------------------- 2892 function CheckZoom_Callback(hObject, eventdata, handles) 2893 2894 if (get(handles.CheckZoom,'Value') == 1); 2895 set(handles.CheckZoom,'BackgroundColor',[1 1 0]) 2896 set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes 2897 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 2898 else 2899 set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7]) 2900 end 2901 2885 2902 %------------------------------------------------------------------- 2886 2903 % --- Executes on button press in 'CheckFixLimits'. … … 2896 2913 2897 2914 %------------------------------------------------------------------- 2898 % --- Executes on button press in CheckFixEqual. 2899 function CheckFixEqual_Callback(hObject, eventdata, handles) 2900 if get(handles.CheckFixEqual,'Value') 2901 set(handles.CheckFixEqual,'BackgroundColor',[1 1 0]) 2915 % --- Executes on button press in CheckFixAspectRatio. 2916 function CheckFixAspectRatio_Callback(hObject, eventdata, handles) 2917 %------------------------------------------------------------------- 2918 if get(handles.CheckFixAspectRatio,'Value') 2919 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0]) 2902 2920 update_plot(handles); 2903 2921 else 2904 set(handles.CheckFix Equal,'BackgroundColor',[0.7 0.7 0.7])2922 set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7]) 2905 2923 update_plot(handles); 2906 2924 end 2907 2925 2908 2926 %------------------------------------------------------------------- 2909 2927 function num_AspectRatio_Callback(hObject, eventdata, handles) 2910 2928 %------------------------------------------------------------------- 2911 % --- Executes on button press in 'CheckZoom'. 2929 set(handles.CheckFixAspectRatio,'Value',1)% select the fixed aspect ratio button 2930 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow 2931 update_plot(handles); 2912 2932 %------------------------------------------------------------------- 2913 function CheckZoom_Callback(hObject, eventdata, handles) 2914 2915 if (get(handles.CheckZoom,'Value') == 1); 2916 set(handles.CheckZoom,'BackgroundColor',[1 1 0]) 2917 set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes 2918 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 2919 else 2920 set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7]) 2921 end 2933 2934 %------------------------------------------------------------------- 2935 2936 2922 2937 2923 2938 %------------------------------------------------------------------- … … 2982 2997 fin=close(nc); 2983 2998 2984 %--------------------------------------------------- 2999 %------------------------------------------------------------------- 2985 3000 % --- Executes on button press in SubField 2986 3001 function SubField_Callback(hObject, eventdata, handles) 2987 % huvmat=get(handles.run0,'parent');3002 %------------------------------------------------------------------- 2988 3003 UvData=get(handles.uvmat,'UserData'); 2989 3004 if get(handles.SubField,'Value')==0% if the subfield button is desactivated … … 3002 3017 set(handles.Fields_1,'Value',1);%set to blank state 3003 3018 set(handles.VelType_1,'Value',1);%set to blank state 3019 set(handles.num_Opacity,'String','')% desactivate opacity setting 3004 3020 if ~strcmp(get(handles.VelType,'Visible'),'on') 3005 3021 set(handles.VelType_1,'Visible','off') … … 3172 3188 if isempty(field_1)%||(numel(UvData.FileType)>=2 && strcmp(UvData.FileType{2},'image')) 3173 3189 set(handles.SubField,'Value',0) 3174 % check_new=1;3175 3190 SubField_Callback(hObject, eventdata, handles) 3176 % if isempty(field_1)%remove second field if 'blank' field is selected 3177 return 3178 % end 3191 return 3179 3192 else 3180 3193 set(handles.SubField,'Value',1)%state that a second field is now entered … … 3201 3214 set(handles.transform_fct,'Value',1)% no transform by default 3202 3215 set(handles.path_transform,'String','') 3216 if check_new 3217 UvData.FileType{2}=UvData.FileType{1}; 3218 set(handles.FileIndex_1,'String',get(handles.FileIndex,'String')) 3219 % set(handles.FileExt_1,'String',get(handles.FileExt,'String')) 3220 set(handles.uvmat,'UserData',UvData) 3221 end 3203 3222 case 'image' 3204 3223 % guess the image name corresponding to the current netcdf name (no unique correspondance) … … 3708 3727 %------------------------------------------------------------------- 3709 3728 update_plot(handles); 3729 3730 %------------------------------------------------------------------- 3731 function num_Opacity_Callback(hObject, eventdata, handles) 3732 update_plot(handles); 3733 %------------------------------------------------------------------- 3710 3734 3711 3735 %------------------------------------------------------------------- … … 4786 4810 web(helpfile); 4787 4811 end 4788 4789 4790 % --- Executes on slider movement.4791 function slider7_Callback(hObject, eventdata, handles)4792 % hObject handle to slider7 (see GCBO)4793 % eventdata reserved - to be defined in a future version of MATLAB4794 % handles structure with handles and user data (see GUIDATA)4795 4796 % Hints: get(hObject,'Value') returns position of slider4797 % get(hObject,'Min') and get(hObject,'Max') to determine range of slider
Note: See TracChangeset
for help on using the changeset viewer.