Ignore:
Timestamp:
Jul 29, 2024, 9:43:17 AM (2 months ago)
Author:
sommeria
Message:

civ3D updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/check_data_files.m

    r1127 r1164  
    6363    ParamOut.ProjObject='off';%can use projection object(option 'off'/'on',
    6464    ParamOut.Mask='off';%can use mask option   (option 'off'/'on', 'off' by default)
    65     ParamOut.OutputSubDirMode='none'; %(options 'none'/'custom'/'auto'/'first'/'last','auto' by default)
     65    ParamOut.OutputSubDirMode='auto'; %(options 'none'/'custom'/'auto'/'first'/'last','auto' by default)
    6666    %                      'none' =no output files
     67    ParamOut.OutputDirExt='.check_series';%set the output dir extension
    6768    return
    6869end
     
    120121for iview=1:nbview
    121122    if isequal(FileType{iview},'mmreader')||isequal(FileType{iview},'video')||isequal(FileType{iview},'multimage')
    122         [FileInfo]=get_file_info(filecell{iview,1});
     123        [FileInfo]=get_file_info(filecell{iview,1});% get infos on the first file in the current line
    123124        Tabchar{1}=filecell{iview,1};%info.Filename;
    124125        Tabchar{2}='';
     
    128129        message='';
    129130    else
    130         Tabchar={};
     131        Tabchar=cell(nbfield_i+1,NbSlice);
    131132        %LOOP ON SLICES
    132133        for i_slice=1:NbSlice
    133134            index_slice=i_slice:NbSlice:nbfield;
    134             filefound={};
    135             datnum=zeros(1,nbfield_j);
     135            filefound=cell(nbfield_i);
     136            datnum=zeros(1,nbfield_i);
     137            Tabchar(1,i_slice)={['slice #' num2str(i_slice)]};
    136138            for ifile=1:nbfield_i
    137                 update_waitbar(WaitbarHandle,ifile/nbfield_i)
    138                 if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
    139                     disp('program stopped by user')
    140                     break
    141                 end
     139 %               update_waitbar(WaitbarHandle,ifile/nbfield_i)
     140%                 if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
     141%                     disp('program stopped by user')
     142%                     break
     143%                 end
    142144                file=filecell{iview,index_slice(ifile)};
    143145                [Path,Name,ext]=fileparts(file);
     
    149151                    if isfield(datfile,'datenum')
    150152                        datnum(ifile)=datfile.datenum;
    151                         filefound(ifile)={datfile.name};
     153                        filefound{ifile}=datfile.name;
    152154                    end
    153155                    lastfield='';
    154                     [FileInfo,Object]=get_file_info(file);
     156                    [FileInfo]=get_file_info(file);
    155157                    FileType{iview}=FileInfo.FileType;
    156158                    if strcmp(FileType{iview},'civx')||strcmp(FileType{iview},'civdata')
     
    159161                            stagechoice=1+mod(FileInfo.CivStage-1,3);
    160162                            iter=1+floor((FileInfo.CivStage-1)/3);
    161                             lastfield=[liststage{stagechoice} num2str(iter)];
    162                             %liststage={'civ1','fix1','patch1','civ2','fix2','patch2'};                       
    163                             %lastfield=liststage{FileInfo.CivStage};                           
     163                            lastfield=[liststage{stagechoice} num2str(iter)];                         
    164164                        end
    165165                    end
    166166                    lastfield=[FileType{iview} ', ' lastfield];
    167167                end
    168                 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]};
    169168                Tabchar(ifile+1,i_slice)={[file '...' lastfield]};
    170169            end
     
    177176            end
    178177        else
    179             datnum=datnum(find(datnum));%keep the non zero values corresponding to existing files
    180             filefound=filefound(find(datnum));
     178            datnum=datnum(datnum);%keep the non zero values corresponding to existing files
     179            filefound=filefound(datnum);
    181180            [first,ind]=min(datnum);
    182181            [last,indlast]=max(datnum);
     
    188187        end
    189188    end
    190     hfig=figure(iview);
    191     clf
    192     if iview>1
    193         pos=get(iview-1,'Position');
    194         pos(1)=pos(1)+(iview-1)*pos(1)/nbview;
    195         set(hfig,'Position',pos)
     189    if checkrun
     190        hfig=figure(iview);
     191        clf
     192        if iview>1
     193            pos=get(iview-1,'Position');
     194            pos(1)=pos(1)+(iview-1)*pos(1)/nbview;
     195            set(hfig,'Position',pos)
     196        end
     197        set(hfig,'name',['check_data_files:view= ' num2str(iview)])
     198        set(hfig,'MenuBar','none')% suppress the menu bar
     199        set(hfig,'NumberTitle','off')%suppress the fig number in the title
     200        h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', {'open_uvmat'});
     201        hh=uicontrol('Style','listbox', 'Position', [20 340 500 40], 'String', message);
     202    else % show results in log file
     203        disp(Tabchar)
     204        disp(message)
    196205    end
    197     set(hfig,'name',['check_data_files:view= ' num2str(iview)])
    198     set(hfig,'MenuBar','none')% suppress the menu bar
    199     set(hfig,'NumberTitle','off')%suppress the fig number in the title
    200     h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', {'open_uvmat'});
    201     hh=uicontrol('Style','listbox', 'Position', [20 340 500 40], 'String', message);
    202 end
    203 
     206end
     207'END'
    204208% 'open_uvmat': open with uvmat the  field selected in the list of 'series/check_data_files'
    205209%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.