Changeset 569 for trunk/src/uvmat.m
- Timestamp:
- Feb 19, 2013, 7:19:07 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r567 r569 334 334 function MenuBrowse_Callback(hObject, eventdata, handles) 335 335 [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles); 336 %oldfile=[fullfile(RootPath,SubDir,RootFile) FileIndices FileExt];337 336 oldfile=fullfile(RootPath,SubDir); 338 337 if isempty(oldfile)||isequal(oldfile,'') %loads the previously stored file name and set it as default in the file_input box … … 352 351 %% display the selected field and related information 353 352 display_file_name( handles,fileinput) 353 354 % ----------------------------------------------------------------------- 355 % --- Executes on the menu Open/Browse campaign... 356 % search the file inside a campaign, using the GUI view_data 357 function MenuBrowseCampaign_Callback(hObject, eventdata, handles) 358 % ----------------------------------------------------------------------- 359 CampaignPath=fileparts(fileparts(get(handles.RootPath,'String'))); 360 DirFull = uigetdir(CampaignPath,'Select a Campaign dir, then press OK'); 361 if ~ischar(DirFull)|| ~exist(DirFull,'dir') 362 return 363 end 364 OutPut=browse_data(DirFull);% open the GUI browse_data to get select a campaign dir, experiment and device 365 if ~isfield(OutPut,'Campaign') 366 return 367 end 368 DirName=fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.Device{1}); 369 hdir=dir(DirName); %list files and dirs 370 for ilist=1:numel(hdir) 371 if ~isequal(hdir(ilist).isdir,1)%look for files, not dir 372 FileName=hdir(ilist).name; 373 FileType=get_file_type(fullfile(DirName,FileName)); 374 switch FileType 375 case {'image','multimage','civx','civdata','netcdf'} 376 break 377 end 378 end 379 end 380 381 %% display the selected field and related information 382 display_file_name( handles,fullfile(DirName,FileName)) 354 383 355 384 % ----------------------------------------------------------------------- … … 432 461 end 433 462 end 463 464 % -------------------------------------------------------------------- 465 function MenuBrowseCampaign_1_Callback(hObject, eventdata, handles) 466 % ----------------------------------------------------------------------- 467 CampaignPath=fileparts(fileparts(get(handles.RootPath,'String'))); 468 DirFull = uigetdir(CampaignPath,'Select a Campaign dir, then press OK'); 469 if ~ischar(DirFull)|| ~exist(DirFull,'dir') 470 return 471 end 472 OutPut=browse_data(DirFull);% open the GUI browse_data to get select a campaign dir, experiment and device 473 if ~isfield(OutPut,'Campaign') 474 return 475 end 476 DirName=fullfile(OutPut.Campaign,OutPut.Experiment{1},OutPut.Device{1}); 477 hdir=dir(DirName); %list files and dirs 478 for ilist=1:numel(hdir) 479 if ~isequal(hdir(ilist).isdir,1)%look for files, not dir 480 FileName=hdir(ilist).name; 481 FileType=get_file_type(fullfile(DirName,FileName)); 482 switch FileType 483 case {'image','multimage','civx','civdata','netcdf'} 484 break 485 end 486 end 487 end 488 489 %% display the selected field and related information 490 set(handles.SubField,'Value',1) 491 display_file_name( handles,fullfile(DirName,FileName),2) 434 492 435 493 % ----------------------------------------------------------------------- … … 2623 2681 ObjectData.A=flag_mask.*double(ObjectData.A); 2624 2682 ObjectData.A=feval(AClass,ObjectData.A); 2625 % ind_off=[];2626 % if isfield(ObjectData,'ListVarName')2627 % for ilist=1:length(ObjectData.ListVarName)2628 % if isequal(ObjectData.ListVarName{ilist},'Mask')||isequal(ObjectData.ListVarName{ilist},'MaskX')||isequal(ObjectData.ListVarName{ilist},'MaskY')2629 % ind_off=[ind_off ilist];2630 % end2631 % end2632 % ObjectData.ListVarName(ind_off)=[];2633 % VarDimIndex(ind_off)=[];2634 % ind_off=[];2635 %2636 % end2637 2683 end 2638 2684 if ~isempty(ObjectData) 2639 PlotType='none'; %default2685 %PlotType='none'; %default 2640 2686 if imap==2 && isempty(view_field_handle) 2641 2687 view_field(ObjectData) … … 4947 4993 end 4948 4994 4949 4950 % --------------------------------------------------------------------4951 function MenuSetProject_Callback(hObject, eventdata, handles)4952 RootPath=get(handles.RootPath,'String');4953 ProjectDir = uigetdir(fileparts(fileparts(RootPath)), 'select the project source directory');4954 datatree_browser(ProjectDir)4955 4956 4957 % --------------------------------------------------------------------4958 function MenuBrowseProject_Callback(hObject, eventdata, handles)4959 RootPath=get(handles.RootPath,'String');4960 ProjectDir = uigetdir(fileparts(fileparts(RootPath)), 'select the project directory');4961 datatree_browser(ProjectDir)4962 4963 4964 4995 % --- Executes on selection change in Coord_y. 4965 4996 function Coord_y_Callback(hObject, eventdata, handles) … … 4971 5002 % --- Executes on button press in CheckColorBar. 4972 5003 function CheckColorBar_Callback(hObject, eventdata, handles) 4973 % hObject handle to CheckColorBar (see GCBO)4974 % eventdata reserved - to be defined in a future version of MATLAB4975 % handles structure with handles and user data (see GUIDATA)4976 4977 % Hint: get(hObject,'Value') returns toggle state of CheckColorBar4978
Note: See TracChangeset
for help on using the changeset viewer.