Changeset 1164 for trunk/src/series/check_data_files.m
- Timestamp:
- Jul 29, 2024, 9:43:17 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/check_data_files.m
r1127 r1164 63 63 ParamOut.ProjObject='off';%can use projection object(option 'off'/'on', 64 64 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) 66 66 % 'none' =no output files 67 ParamOut.OutputDirExt='.check_series';%set the output dir extension 67 68 return 68 69 end … … 120 121 for iview=1:nbview 121 122 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 123 124 Tabchar{1}=filecell{iview,1};%info.Filename; 124 125 Tabchar{2}=''; … … 128 129 message=''; 129 130 else 130 Tabchar= {};131 Tabchar=cell(nbfield_i+1,NbSlice); 131 132 %LOOP ON SLICES 132 133 for i_slice=1:NbSlice 133 134 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)]}; 136 138 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 break141 end139 % 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 142 144 file=filecell{iview,index_slice(ifile)}; 143 145 [Path,Name,ext]=fileparts(file); … … 149 151 if isfield(datfile,'datenum') 150 152 datnum(ifile)=datfile.datenum; 151 filefound (ifile)={datfile.name};153 filefound{ifile}=datfile.name; 152 154 end 153 155 lastfield=''; 154 [FileInfo ,Object]=get_file_info(file);156 [FileInfo]=get_file_info(file); 155 157 FileType{iview}=FileInfo.FileType; 156 158 if strcmp(FileType{iview},'civx')||strcmp(FileType{iview},'civdata') … … 159 161 stagechoice=1+mod(FileInfo.CivStage-1,3); 160 162 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)]; 164 164 end 165 165 end 166 166 lastfield=[FileType{iview} ', ' lastfield]; 167 167 end 168 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]};169 168 Tabchar(ifile+1,i_slice)={[file '...' lastfield]}; 170 169 end … … 177 176 end 178 177 else 179 datnum=datnum( find(datnum));%keep the non zero values corresponding to existing files180 filefound=filefound( find(datnum));178 datnum=datnum(datnum);%keep the non zero values corresponding to existing files 179 filefound=filefound(datnum); 181 180 [first,ind]=min(datnum); 182 181 [last,indlast]=max(datnum); … … 188 187 end 189 188 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) 196 205 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 206 end 207 'END' 204 208 % 'open_uvmat': open with uvmat the field selected in the list of 'series/check_data_files' 205 209 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.