Changeset 783 for trunk/src/series.m
- Timestamp:
- Jun 5, 2014, 10:39:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r781 r783 424 424 if ~isequal(ListStruct(ilist).isdir,1)%look for files, not dir 425 425 FileName=ListStruct(ilist).name; 426 File Type=get_file_type(fullfile(DirName,FileName));427 switch File Type426 FileInfo=get_file_type(fullfile(DirName,FileName)); 427 switch FileInfo.FileType 428 428 case {'image','multimage','civx','civdata','netcdf'} 429 429 break … … 477 477 if ~isequal(hdir(ilist).isdir,1)%look for files, not dir 478 478 FileName=hdir(ilist).name; 479 File Type=get_file_type(fullfile(DirName,FileName));480 switch File Type479 FileInfo=get_file_type(fullfile(DirName,FileName)); 480 switch FileInfo.FileType 481 481 case {'image','multimage','civx','civdata','netcdf'} 482 482 break … … 553 553 RootPath=fileparts(RootPath); %will try the upper folder 554 554 else %scan the input folder 555 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,File Type,FileInfo,MovieObject]=...555 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=... 556 556 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]); 557 557 end … … 607 607 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 608 608 % the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists 609 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType,FileInfo,MovieObject,i1,i2,j1,j2]=find_file_series(FilePath,[FileName FileExt]); 609 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileInfo,MovieObject,i1,i2,j1,j2]=find_file_series(FilePath,[FileName FileExt]); 610 FileType=FileInfo.FileType; 610 611 if isempty(RootFile)&&isempty(i1_series) 611 612 errormsg='no input file in the series'; … … 1024 1025 %% set length of waitbar 1025 1026 displ_time(handles) 1026 1027 1028 % look for netcdf data as input1029 % switch FileType1030 % case {'civx','civdata'}1031 % FieldList=[set_field_list('U','V');{'C'}];%standard menu for civx data1032 % set(handles.Coord_x,'String','X');1033 % set(handles.Coord_y,'String','Y');1034 % case 'netcdf'1035 % ind_x=find(strcmp(get(handles.Coord_x,'String'),FileInfo.ListVarName));1036 % if isempty(ind_x)1037 % FieldList={};% new kind of file opened, we need to pick variables with get_field...1038 % set(handles.Coord_x,'String','')1039 % set(handles.Coord_y,'String','')1040 % else1041 % FileInfo.ListVarName(ind_x)=[];%remove coord-x from the list of variables to display1042 % ind_y=find(strcmp(get(handles.Coord_y,'String'),FileInfo.ListVarName));1043 % if isempty(ind_y)1044 % FieldList={};% new kind of file opened, we need to pick variables with get_field...1045 % set(handles.Coord_x,'String','')1046 % set(handles.Coord_y,'String','')1047 % else1048 % FileInfo.ListVarName(ind_y)=[];%remove coord-y from the list of variables to display1049 % FieldList=(FileInfo.ListVarName)';1050 % end1051 % end1052 % otherwise1053 % set(handles.FieldName,'Value',1) % set menu to 'image'1054 % set(handles.FieldName,'String',{'image'})1055 % set(handles.Coord_x,'String','AX');1056 % set(handles.Coord_y,'String','AY');1057 % end1058 % if ismember(FileType,{'civx','civdata','netcdf'})1059 % PrevMenu=get(handles.FieldName,'String');1060 % PrevValue=get(handles.FieldName,'Value');1061 % PrevMenu=PrevMenu(PrevValue(PrevValue<=numel(PrevMenu)));1062 % FieldValue=[];1063 % for ilist=1:numel(PrevMenu)1064 % index_menu=find(strcmp(PrevMenu{ilist},FieldList));1065 % if ~isempty(index_menu)1066 % FieldValue=[FieldValue index_menu];1067 % end1068 % end1069 % if isempty(FieldValue)1070 % FieldValue=1;1071 % end1072 % set(handles.FieldName,'Value',FieldValue)1073 % set(handles.FieldName,'String',[FieldList;{'get_field...'}])1074 % end1075 1027 1076 1028 … … 3023 2975 set(htitlebox,'String',FullSelectName) 3024 2976 elseif exist(FullSelectName,'file')%visualise the vel field if it exists 3025 File Type=get_file_type(FullSelectName);3026 if strcmp(File Type,'txt')2977 FileInfo=get_file_type(FullSelectName); 2978 if strcmp(FileInfo.FileType,'txt') 3027 2979 edit(FullSelectName) 3028 elseif strcmp(File Type,'xml')2980 elseif strcmp(FileInfo.FileType,'xml') 3029 2981 editxml(FullSelectName) 3030 2982 else
Note: See TracChangeset
for help on using the changeset viewer.