Changeset 783 for trunk/src/series.m


Ignore:
Timestamp:
Jun 5, 2014, 10:39:28 PM (10 years ago)
Author:
sommeria
Message:

-pb of mulitple tiff reading solved
-modif of output parma in get-file_type and find_file_series

  • introduction of transform/ima_noise_rms
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r781 r783  
    424424    if ~isequal(ListStruct(ilist).isdir,1)%look for files, not dir
    425425        FileName=ListStruct(ilist).name;
    426         FileType=get_file_type(fullfile(DirName,FileName));
    427         switch FileType
     426        FileInfo=get_file_type(fullfile(DirName,FileName));
     427        switch FileInfo.FileType
    428428            case {'image','multimage','civx','civdata','netcdf'}
    429429                break
     
    477477    if ~isequal(hdir(ilist).isdir,1)%look for files, not dir
    478478        FileName=hdir(ilist).name;
    479         FileType=get_file_type(fullfile(DirName,FileName));
    480         switch FileType
     479        FileInfo=get_file_type(fullfile(DirName,FileName));
     480        switch FileInfo.FileType
    481481            case {'image','multimage','civx','civdata','netcdf'}
    482482            break
     
    553553        RootPath=fileparts(RootPath); %will try the upper folder
    554554    else %scan the input folder
    555         [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,FileInfo,MovieObject]=...
     555        [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=...
    556556            find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]);
    557557    end
     
    607607% detect the file type, get the movie object if relevant, and look for the corresponding file series:
    608608% 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]);
     610FileType=FileInfo.FileType;
    610611if isempty(RootFile)&&isempty(i1_series)
    611612    errormsg='no input file in the series';
     
    10241025%% set length of waitbar
    10251026displ_time(handles)
    1026 
    1027 
    1028 % look for netcdf data as input
    1029 % switch FileType
    1030 %     case {'civx','civdata'}
    1031 %         FieldList=[set_field_list('U','V');{'C'}];%standard menu for civx data
    1032 %         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 %         else
    1041 %             FileInfo.ListVarName(ind_x)=[];%remove coord-x from the list of variables to display
    1042 %             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 %             else
    1048 %                 FileInfo.ListVarName(ind_y)=[];%remove coord-y from the list of variables to display
    1049 %                 FieldList=(FileInfo.ListVarName)';
    1050 %             end
    1051 %         end 
    1052 %     otherwise
    1053 %         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 % end
    1058 % 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 %         end
    1068 %     end
    1069 %     if isempty(FieldValue)
    1070 %         FieldValue=1;
    1071 %     end
    1072 %     set(handles.FieldName,'Value',FieldValue)
    1073 %     set(handles.FieldName,'String',[FieldList;{'get_field...'}])
    1074 % end
    10751027
    10761028
     
    30232975    set(htitlebox,'String',FullSelectName)
    30242976elseif exist(FullSelectName,'file')%visualise the vel field if it exists
    3025     FileType=get_file_type(FullSelectName);
    3026     if strcmp(FileType,'txt')
     2977    FileInfo=get_file_type(FullSelectName);   
     2978    if strcmp(FileInfo.FileType,'txt')
    30272979        edit(FullSelectName)
    3028     elseif strcmp(FileType,'xml')
     2980    elseif strcmp(FileInfo.FileType,'xml')
    30292981        editxml(FullSelectName)
    30302982    else
Note: See TracChangeset for help on using the changeset viewer.