Changeset 626
- Timestamp:
- May 2, 2013, 7:55:11 PM (12 years ago)
- Location:
- trunk/src/series
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/check_data_files.m
r616 r626 45 45 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) 46 46 ParamOut.OutputDirExt='';%set the output dir extension (blank=no output dir) 47 return47 return 48 48 end 49 49 %%%%%%%%%%%% STANDARD PART %%%%%%%%%%%% … … 55 55 checkrun=0; 56 56 end 57 hseries=findobj(allchild(0),'Tag','series'); 58 RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series 59 WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series 57 60 58 61 %% root input file(s) and type … … 70 73 % filecell{iview,fileindex}: 71 74 % iview: line in the table corresponding to a given file series 72 % fileindex: file index within the file series, 73 % i1_series(iview,ref_j,ref_i)... are the corresponding arrays of indices i1,i2,j1,j2, depending on the input line iview and the two reference indices ref_i,ref_j 75 % fileindex: file index within the file series, 76 % i1_series(iview,ref_j,ref_i)... are the corresponding arrays of indices i1,i2,j1,j2, depending on the input line iview and the two reference indices ref_i,ref_j 74 77 % i1_series(iview,fileindex) expresses the same indices as a 1D array in file indices 75 78 %%%%%%%%%%%% … … 82 85 nbfield_i=size(i1_series{1},2); %nb of fields for the i index 83 86 nbfield=nbfield_j*nbfield_i; %total number of fields 84 nbfield_i=floor(nbfield/NbSlice);%total number of indexes in a slice (adjusted to an integer number of slices) 87 nbfield_i=floor(nbfield/NbSlice);%total number of indexes in a slice (adjusted to an integer number of slices) 85 88 nbfield=nbfield_i*NbSlice; %total number of fields after adjustement 86 89 87 %determine the file type on each line from the first input file 90 %determine the file type on each line from the first input file 88 91 ImageTypeOptions={'image','multimage','mmreader','video'}; 89 92 NcTypeOptions={'netcdf','civx','civdata'}; … … 101 104 Tabchar{2}=''; 102 105 Tabchar{3}=[num2str(FileInfo.FrameRate) ' frames/s ']; 103 % Tabchar{4}='';104 % Tabchar{5}=[' compression' FileInfo.VideoCompression];105 % Tabchar{6}=[ 'quality ' num2str(FileInfo.Quality)];106 % Tabchar{4}=''; 107 % Tabchar{5}=[' compression' FileInfo.VideoCompression]; 108 % Tabchar{6}=[ 'quality ' num2str(FileInfo.Quality)]; 106 109 else 107 110 Tabchar={}; … … 112 115 datnum=zeros(1,nbfield_j); 113 116 for ifile=1:nbfield_i 114 if checkrun 115 stopstate=get(Param.RUNHandle,'BusyAction'); 116 update_waitbar(Param.WaitbarHandle,ifile/nbfield_i) 117 update_waitbar(WaitbarHandle,ifile/nbfield_i) 118 if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 119 disp('program stopped by user') 120 break 121 end 122 file=filecell{iview,index_slice(ifile)}; 123 [Path,Name,ext]=fileparts(file); 124 detect=exist(file,'file'); % check the existence of the file 125 if detect==0 126 lastfield='not found'; 117 127 else 118 stopstate='queue'; 128 datfile=dir(file); 129 if isfield(datfile,'datenum') 130 datnum(ifile)=datfile.datenum; 131 filefound(ifile)={datfile.name}; 132 end 133 lastfield=''; 134 [FileType{iview},FileInfo,Object]=get_file_type(file); 135 if strcmp(FileType{iview},'civx')||strcmp(FileType{iview},'civdata') 136 if isfield(FileInfo,'CivStage') 137 liststage={'civ1','fix1','patch1','civ2','fix2','patch2'}; 138 lastfield=liststage{FileInfo.CivStage}; 139 end 140 end 141 lastfield=[FileType{iview} ', ' lastfield]; 119 142 end 120 if isequal(stopstate,'queue')% enable STOP command 121 file=filecell{iview,index_slice(ifile)}; 122 [Path,Name,ext]=fileparts(file); 123 detect=exist(file,'file'); % check the existence of the file 124 if detect==0 125 lastfield='not found'; 126 else 127 datfile=dir(file); 128 if isfield(datfile,'datenum') 129 datnum(ifile)=datfile.datenum; 130 filefound(ifile)={datfile.name}; 131 end 132 lastfield=''; 133 [FileType{iview},FileInfo,Object]=get_file_type(file); 134 if strcmp(FileType{iview},'civx')||strcmp(FileType{iview},'civdata') 135 if isfield(FileInfo,'CivStage') 136 liststage={'civ1','fix1','patch1','civ2','fix2','patch2'}; 137 lastfield=liststage{FileInfo.CivStage}; 138 end 139 end 140 lastfield=[FileType{iview} ', ' lastfield]; 141 end 142 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]}; 143 Tabchar(ifile+1,i_slice)={[file '...' lastfield]}; 144 end 143 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]}; 144 Tabchar(ifile+1,i_slice)={[file '...' lastfield]}; 145 145 end 146 146 end -
trunk/src/series/merge_proj.m
r624 r626 189 189 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% 190 190 for index=1:NbField 191 update_waitbar(WaitbarHandle,index/ nbfield)191 update_waitbar(WaitbarHandle,index/NbField) 192 192 if ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 193 193 disp('program stopped by user')
Note: See TracChangeset
for help on using the changeset viewer.