Changeset 503
- Timestamp:
- Jul 26, 2012, 10:14:52 AM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compile_functions.m
r481 r503 1 % check 2 if isempty(which('mcc') 3 msgbox_uvmat('no Matlab compiler toolbox mcc installed') 4 return 5 end 6 display('compiling civ_matlab...') 1 7 % commands to compile civ_matlab and eventually other functions 2 3 8 mcc -m -R -nojvm -R -nodisplay civ_matlab.m 4 9 system('mv -f civ_matlab bin/'); … … 6 11 system('rm run_civ_matlab.sh'); 7 12 system('chmod +x civ_matlab.sh'); 13 display('** END **') 8 14 9 15 10 16 11 -
trunk/src/get_field.m
r494 r503 22 22 function varargout = get_field(varargin) 23 23 24 % Last Modified by GUIDE v2.5 31-May-2012 22:52:2824 % Last Modified by GUIDE v2.5 26-Jul-2012 09:11:23 25 25 26 26 % Begin initialization code - DO NOT EDIT … … 241 241 end 242 242 if maxdim>=2 243 set(handles. check_1Dplot,'Value',0)243 set(handles.CheckPlot1D,'Value',0) 244 244 if ~isempty(VarType{imax}.vector_x) && ~isempty(VarType{imax}.vector_y) 245 set(handles. check_vector,'Value',1)246 set(handles. check_scalar,'Value',0)245 set(handles.CheckVector,'Value',1) 246 set(handles.CheckScalar,'Value',0) 247 247 set(handles.vector_x,'Value',VarType{imax}.vector_x(1)) 248 248 set(handles.vector_y,'Value',VarType{imax}.vector_y(1)) … … 258 258 end 259 259 else 260 set(handles. check_scalar,'Value',1)261 set(handles. check_vector,'Value',0)260 set(handles.CheckScalar,'Value',1) 261 set(handles.CheckVector,'Value',0) 262 262 if isfield(VarType{imax},'scalar') && length(VarType{imax}.scalar)>=1 263 263 set(handles.scalar,'Value',VarType{imax}.scalar(1)) … … 282 282 end 283 283 end 284 check_1Dplot_Callback(handles.check_1Dplot, [], handles)285 check_scalar_Callback(handles.check_scalar, [], handles)286 check_vector_Callback(handles.check_vector, [], handles)284 CheckPlot1D_Callback(handles.CheckPlot1D, [], handles) 285 CheckScalar_Callback(handles.CheckScalar, [], handles) 286 CheckVector_Callback(handles.CheckVector, [], handles) 287 287 end 288 288 %scalar_Callback(handles.get_field, eventdata, handles) … … 323 323 Field=get(hselect_field,'UserData');%current input field 324 324 xdispindex=get(handles.abscissa,'Value');%index in the list of abscissa 325 % test_2D=get(handles. check_vector,'Value');% =1 for vector fields326 % test_scalar=get(handles. check_scalar,'Value');% =1 for scalar fields325 % test_2D=get(handles.CheckVector,'Value');% =1 for vector fields 326 % test_scalar=get(handles.CheckScalar,'Value');% =1 for scalar fields 327 327 %if isequal(xdispindex,1)% blank selection, no selected TimeVariable for abscissa 328 328 % Txt=Field.ListVarName; … … 584 584 585 585 % select the indices of field variables for 2D plots 586 test_ check_1Dplot=get(handles.check_1Dplot,'Value');587 test_scalar=get(handles. check_scalar,'Value');588 test_vector=get(handles. check_vector,'Value');586 test_CheckPlot1D=get(handles.CheckPlot1D,'Value'); 587 test_scalar=get(handles.CheckScalar,'Value'); 588 test_vector=get(handles.CheckVector,'Value'); 589 589 590 590 %transform if needed (calibration) … … 749 749 if isempty(index_detect) 750 750 VarIndex_tot=[VarIndex_tot VarIndex.x]; 751 elseif ~test_ check_1Dplot751 elseif ~test_CheckPlot1D 752 752 VarIndex.x=[]; 753 753 set(handles.abscissa,'Value',1)%vchosen abscissa already chosen, suppres it as abscissa … … 1158 1158 1159 1159 %------------------------------------------------------------------------ 1160 % --- Executes on button press in check_1Dplot.1161 function check_1Dplot_Callback(hObject, eventdata, handles)1162 %------------------------------------------------------------------------ 1163 val=get(handles. check_1Dplot,'Value');1160 % --- Executes on button press in CheckPlot1D. 1161 function CheckPlot1D_Callback(hObject, eventdata, handles) 1162 %------------------------------------------------------------------------ 1163 val=get(handles.CheckPlot1D,'Value'); 1164 1164 if isequal(val,0) 1165 1165 set(handles.Panel1Dplot,'Visible','off') … … 1169 1169 1170 1170 %------------------------------------------------------------------------ 1171 % --- Executes on button press in check_scalar.1172 function check_scalar_Callback(hObject, eventdata, handles)1173 %------------------------------------------------------------------------ 1174 val=get(handles. check_scalar,'Value');1171 % --- Executes on button press in CheckScalar. 1172 function CheckScalar_Callback(hObject, eventdata, handles) 1173 %------------------------------------------------------------------------ 1174 val=get(handles.CheckScalar,'Value'); 1175 1175 if isequal(val,0) 1176 1176 set(handles.PanelScalar,'Visible','off') … … 1180 1180 1181 1181 %------------------------------------------------------------------------ 1182 % --- Executes on button press in check_vector.1183 function check_vector_Callback(hObject, eventdata, handles)1184 %------------------------------------------------------------------------ 1185 val=get(handles. check_vector,'Value');1182 % --- Executes on button press in CheckVector. 1183 function CheckVector_Callback(hObject, eventdata, handles) 1184 %------------------------------------------------------------------------ 1185 val=get(handles.CheckVector,'Value'); 1186 1186 if isequal(val,0) 1187 1187 set(handles.PanelVectors,'Visible','off') … … 1288 1288 test_vector=0; 1289 1289 if iscell(GUI_input) 1290 for ilist=1: length(GUI_input)1291 switch GUI_input{ilist }1290 for ilist=1:size(GUI_input,1) 1291 switch GUI_input{ilist,1} 1292 1292 %RootFile always visible 1293 case ' check_1Dplot'1294 test_1Dplot= 1;1295 case ' check_scalar'1296 test_scalar= 1;1297 case ' check_vector'1298 test_vector= 1;1299 end 1300 end 1301 end 1302 set(handles. check_1Dplot,'Value',test_1Dplot);1303 set(handles. check_scalar,'Value',test_scalar);1304 set(handles. check_vector,'Value',test_vector);1305 check_1Dplot_Callback(hObject, eventdata, handles)1306 check_scalar_Callback(hObject, eventdata, handles)1307 check_vector_Callback(hObject, eventdata, handles)1293 case 'CheckPlot1D' 1294 test_1Dplot=isequal(GUI_input{ilist,2},'on'); 1295 case 'CheckScalar' 1296 test_scalar=isequal(GUI_input{ilist,2},'on'); 1297 case 'CheckVector' 1298 test_vector=isequal(GUI_input{ilist,2},'on'); 1299 end 1300 end 1301 end 1302 set(handles.CheckPlot1D,'Value',test_1Dplot); 1303 set(handles.CheckScalar,'Value',test_scalar); 1304 set(handles.CheckVector,'Value',test_vector); 1305 CheckPlot1D_Callback(hObject, eventdata, handles) 1306 CheckScalar_Callback(hObject, eventdata, handles) 1307 CheckVector_Callback(hObject, eventdata, handles) 1308 1308 1309 1309 -
trunk/src/read_get_field.m
r498 r503 24 24 25 25 % select the indices of field variables for 2D plots 26 test_1Dplot=get(handles. check_1Dplot,'Value');27 test_scalar=get(handles. check_scalar,'Value');28 test_vector=get(handles. check_vector,'Value');26 test_1Dplot=get(handles.CheckPlot1D,'Value'); 27 test_scalar=get(handles.CheckScalar,'Value'); 28 test_vector=get(handles.CheckVector,'Value'); 29 29 30 30 nbvar=0; -
trunk/src/uvmat.m
r501 r503 414 414 end 415 415 end 416 % [FileName, PathName] = uigetfile( ...417 % {'*.xml;*.xls;*.civ;*.png;*.jpg;*.tif;*.avi;*.AVI;*.vol;*.nc;*.cmx;*.fig;*.log;*.dat;*.bat;', ' (*.xml,*.xls,*.civ,*.jpg ,*.png, .tif, *.avi,*.vol,*.nc,*.cmx,*.fig,*.log,*.dat,*.bat)';418 % '*.xml', '.xml files '; ...419 % '*.xls', '.xls files '; ...420 % '*.civ', '.civ files '; ...421 % '*.jpg',' jpeg image files'; ...422 % '*.png','.png image files'; ...423 % '*.tif','.tif image files'; ...424 % '*.avi;*.AVI','.avi movie files'; ...425 % '*.vol','.volume images (png)'; ...426 % '*.nc','.netcdf files'; ...427 % '*.cdf','.netcdf files'; ...428 % '*.cmx','.cmx text files ';...429 % '*.fig','.fig files (matlab fig)';...430 % '*.log','.log text files ';...431 % '*.dat','.dat text files ';...432 % '*.bat','.bat system command text files';...433 % '*.*', 'All Files (*.*)'}, ...434 % 'Pick a file',oldfile);435 436 416 [FileName, PathName] = uigetfile({'*.*','All Files(*.*)'},'Pick a file',oldfile); 437 417 fileinput=[PathName FileName];%complete file name 438 sizf=size(fileinput); 439 if (~ischar(fileinput)||~isequal(sizf(1),1)),return;end 440 441 % display the selected field and related information 418 if ~exist(fileinput,'file') 419 return %abandon of the browser is cancelled 420 end 421 422 %% display the selected field and related information 442 423 display_file_name( handles,fileinput) 443 424 … … 483 464 %------------------------------------------------------------------------ 484 465 RootPath=get(handles.RootPath,'String'); 485 % [FileName, PathName, filterindex] = uigetfile( ...486 % {'*.xml;*.xls;*.civ;*.jpg;*.png;*.avi;*.AVI;*.nc;*.cmx;*.fig;*.log;*.dat', ' (*.xml,*.xls,*.civ, *.jpg,*.png, *.avi,*.nc,*.cmx ,*.fig,*.log,*.dat)';487 % '*.xml', '.xml files '; ...488 % '*.xls', '.xls files '; ...489 % '*.civ', '.civ files '; ...490 % '*.jpg','.jpg image files'; ...491 % '*.png','.png image files'; ...492 % '*.avi;*.AVI','.avi movie files'; ...493 % '*.nc','.netcdf files'; ...494 % '*.cdf','.netcdf files'; ...495 % '*.cmx','.cmx text files';...496 % '*.cmx2','.cmx2 text files';...497 % '*.fig','.fig files (matlab fig)';...498 % '*.log','.log text files ';...499 % '*.dat','.dat text files ';...500 % '*.*', 'All Files (*.*)'}, ...501 % 'Pick a second file for comparison',RootPath);502 466 [FileName, PathName] = uigetfile({'*.*','All Files(*.*)'},'Pick a file',RootPath); 503 467 fileinput_1=[PathName FileName];%complete file name 504 sizf=size(fileinput_1); 505 if (~ischar(fileinput_1)||~isequal(sizf(1),1)),return;end 468 if ~exist(fileinput_1,'file') 469 return %abandon of the browser is cancelled 470 end 506 471 507 472 % refresh the current displayed field … … 734 699 set(hfig,'WindowButtonUpFcn','mouse_up')%set mouse click action function 735 700 set(hfig,'WindowButtonUpFcn','mouse_down')%set mouse click action function 736 case {'xml','xls'} % edit xml or Excel files 701 case 'xml' % edit xml files 702 if ~isempty(regexp(fileinput,'.project.xml$')) 703 datatree_browser(fileinput) 704 else 705 editxml(fileinput); 706 end 707 % if exist(regexprep(fileinput,'.project.xml$','.link'),'dir') 708 % datatree_browser(regexprep(fileinput,'.project.xml$','.link')) 709 % check_project=1; 710 % elseif exist(regexprep(fileinput,'.project.xml$',''),'dir') 711 % datatree_browser(regexprep(fileinput,'.project.xml$','')) 712 % check_project=1; 713 % end 714 % end 715 % if ~check_project 716 % editxml(fileinput); 717 case 'xls' 737 718 editxml(fileinput); 738 719 otherwise … … 798 779 set(handles.MenuExportMovie,'Enable','on') 799 780 set(handles.MenuTools,'Enable','on') 800 % set(handles.OBJECT_txt,'Visible','on') 801 % set(handles.edit_object,'Visible','on') 802 % set(handles.ListObject_1,'Visible','on') 803 % set(handles.ViewObject,'Visible','on') 804 % set(handles.frame_object,'Visible','on') 805 781 806 782 % initiate input file series and refresh the current field view: 807 783 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,index); 808 784 785 end 786 787 %% update list of recent files in the menubar and save it for future opening 788 MenuFile=[{get(handles.MenuFile_1,'Label')};{get(handles.MenuFile_2,'Label')};... 789 {get(handles.MenuFile_3,'Label')};{get(handles.MenuFile_4,'Label')};{get(handles.MenuFile_5,'Label')}]; 790 str_find=strcmp(fileinput,MenuFile); 791 if isempty(find(str_find,1)) 792 MenuFile=[{fileinput};MenuFile];%insert the current file if not already in the list 793 end 794 for ifile=1:min(length(MenuFile),5) 795 eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',MenuFile{ifile});']) 796 eval(['set(handles.MenuFile_' num2str(ifile) '_1,''Label'',MenuFile{ifile});']) 797 end 798 dir_perso=prefdir; 799 profil_perso=fullfile(dir_perso,'uvmat_perso.mat'); 800 if exist(profil_perso,'file') 801 save (profil_perso,'MenuFile','-append'); %store the file names for future opening of uvmat 802 else 803 save (profil_perso,'MenuFile','-V6'); %store the file names for future opening of uvmat 809 804 end 810 805 … … 1129 1124 CheckMask_Callback([],[],handles) 1130 1125 end 1131 1132 %% update list of recent files in the menubar and save it for future opening1133 MenuFile=[{get(handles.MenuFile_1,'Label')};{get(handles.MenuFile_2,'Label')};...1134 {get(handles.MenuFile_3,'Label')};{get(handles.MenuFile_4,'Label')};{get(handles.MenuFile_5,'Label')}];1135 str_find=strcmp(FileName,MenuFile);1136 if isempty(find(str_find,1))1137 MenuFile=[{FileName};MenuFile];%insert the current file if not already in the list1138 end1139 for ifile=1:min(length(MenuFile),5)1140 eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',MenuFile{ifile});'])1141 eval(['set(handles.MenuFile_' num2str(ifile) '_1,''Label'',MenuFile{ifile});'])1142 end1143 dir_perso=prefdir;1144 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');1145 if exist(profil_perso,'file')1146 save (profil_perso,'MenuFile','-append'); %store the file names for future opening of uvmat1147 else1148 save (profil_perso,'MenuFile','-V6'); %store the file names for future opening of uvmat1149 end1150 1151 1126 1152 1127 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.