Changeset 454 for trunk/src/series/aver_stat.m
- Timestamp:
- Jun 13, 2012, 5:04:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r451 r454 63 63 % get the set of input file names (cell array filecell), and the lists of 64 64 % input file or frame indices i1_series,i2_series,j1_series,j2_series 65 65 66 [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 67 66 68 % filecell{iview,fileindex}: cell array representing the list of file names 67 69 % iview: line in the table corresponding to a given file series … … 70 72 % i1_series(iview,fileindex) expresses the same indices as a 1D array in file indices 71 73 % set of frame indices used for movie or multimage input 72 if ~isempty(j1_series) 73 frame_index=j1_series; 74 else 75 frame_index=i1_series; 76 end 74 77 75 78 76 %% root input file(s) and type … … 88 86 NbSlice=Param.IndexRange.NbSlice; 89 87 end 90 nbview=size(i1_series,1);%number of input file series (lines in InputTable) 91 nbfield_j=size(i1_series,2); %nb of consecutive fields at each level(burst 92 nbfield=nbfield_j*size(i1_series,3); %total number of files or frames 93 nbfield_i=floor(nbfield/NbSlice);%total number of i indexes (adjusted to an integer number of slices) 94 nbfield=nbfield_i*nbfield_j; %total number of fields after adjustement 88 nbview=numel(i1_series);%number of input file series (lines in InputTable) 89 nbfield_j=size(i1_series{1},1); %nb of consecutive fields for the j index (bursts or volume slices) 90 nbfield_i=size(i1_series{1},2); %nb of consecutive fields for the i index 91 nbfield=nbfield_j*nbfield_i; %total number of files or frames 92 nbfield_i=floor(nbfield/NbSlice);%total number of indexes in a slice (adjusted to an integer number of slices) 93 nbfield=nbfield_i*NbSlice; %total number of fields after adjustement 95 94 96 95 %determine the file type on each line from the first input file … … 106 105 CheckImage{iview}=~isempty(find(strcmp(FileType{iview},ImageTypeOptions)));% =1 for images 107 106 CheckNc{iview}=~isempty(find(strcmp(FileType{iview},NcTypeOptions)));% =1 for netcdf files 107 if ~isempty(j1_series{iview}) 108 frame_index{iview}=j1_series{iview}; 109 else 110 frame_index{iview}=i1_series{iview}; 111 end 108 112 end 109 113 … … 178 182 end 179 183 end 180 if size(time,2) < i2_series (1,end) || size(time,3) < j2_series(1,end)% time array absent or too short in ImaDoc xml file'184 if size(time,2) < i2_series{1}(end) || size(time,3) < j2_series{1}(end)% time array absent or too short in ImaDoc xml file' 181 185 time=[]; 182 186 end … … 279 283 280 284 %%%%%%%%%%%%%%%% loop on views (input lines) %%%%%%%%%%%%%%%% 285 index 281 286 for iview=1:nbview 282 287 % reading input file(s) 283 [Data{iview},ParamOut,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index (iview,index));288 [Data{iview},ParamOut,errormsg] = read_field(filecell{iview,index},FileType{iview},InputFields{iview},frame_index{iview}(index)); 284 289 if ~isempty(errormsg) 285 290 errormsg=['error of input reading: ' errormsg]; … … 287 292 end 288 293 if ~isempty(NbSlice_calib) 289 Data{iview}.ZIndex=mod(i1_series (iview,index)-1,NbSlice_calib{1})+1;%Zindex for phys transform294 Data{iview}.ZIndex=mod(i1_series{iview}(index)-1,NbSlice_calib{iview})+1;%Zindex for phys transform 290 295 end 291 296 end … … 373 378 end 374 379 else % time from ImaDoc prevails 375 DataOut.Time=time(1,i1_series (1,1),j1_series(1,1));376 DataOut.Time_end=time(end,i1_series (end,end),j1_series(end,end));380 DataOut.Time=time(1,i1_series{1}(1),j1_series{1}(1)); 381 DataOut.Time_end=time(end,i1_series{end}(end),j1_series{end}(end)); 377 382 end 378 383 379 384 %writing the result file 380 OutputFile=fullfile_uvmat(RootPath{1},Param.OutputSubDir,RootFile{1},FileExtOut,NomTypeOut,i1_series (1,1),i1_series(1,end),i_slice,[]);385 OutputFile=fullfile_uvmat(RootPath{1},Param.OutputSubDir,RootFile{1},FileExtOut,NomTypeOut,i1_series{1}(1),i1_series{1}(end),i_slice,[]); 381 386 if CheckImage{1} %case of images 382 387 if isequal(FileInfo{1}.BitDepth,16)||(numel(FileInfo)==2 &&isequal(FileInfo{2}.BitDepth,16))
Note: See TracChangeset
for help on using the changeset viewer.