Changeset 478 for trunk/src/series/check_data_files.m
- Timestamp:
- Jun 26, 2012, 8:41:27 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/check_data_files.m
r470 r478 49 49 end 50 50 51 %% get input parameters, file names and indices 51 %%%%%%%%%%%% STANDARD PART %%%%%%%%%%%% 52 %% select different modes, RUN, parameter input, BATCH 52 53 % BATCH case: read the xml file for batch case 54 if ischar(Param) 55 Param=xml2struct(Param); 56 checkrun=0; 57 % RUN case: parameters introduced as the input structure Param 58 else 59 if isfield(Param,'Specific')&& strcmp(Param.Specific,'?') 60 checkrun=1;% will only search interactive input parameters (preparation of BATCH mode) 61 else 62 checkrun=2; % indicate the RUN option is used 63 end 64 hseries=guidata(Param.hseries);%handles of the GUI series 65 end 53 66 ParamOut=Param; %default output 54 if ischar(Param) && ~isempty(find(regexp('Param','.xml$'))) 55 Param=xml2struct(Param); 56 checkrun=0; 57 % RUN case: parameters introduced as the input structure Param 58 else 59 hseries=guidata(Param.hseries);%handles of the GUI series 60 WaitbarPos=get(hseries.waitbar_frame,'Position');%position of the waitbar on the GUI series 61 checkrun=1; % indicate the RUN option is used 62 end 63 % get the set of input file names (cell array filecell), and the lists of 64 % input file or frame indices i1_series,i2_series,j1_series,j2_series 65 [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 66 % filecell{iview,fileindex}: cell array representing the list of file names 67 % iview: line in the table corresponding to a given file series 68 % fileindex: file index within the file series, 69 % 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 70 % i1_series(iview,fileindex) expresses the same indices as a 1D array in file indices 71 % 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 77 67 %OutputDir=[Param.OutputSubDir Param.OutputDirExt];NO OUTPUT FILE 68 78 69 %% root input file(s) and type 79 70 RootPath=Param.InputTable(:,1); … … 82 73 NomType=Param.InputTable(:,4); 83 74 FileExt=Param.InputTable(:,5); 84 85 % numbers of slices and file indices 75 [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 76 %%%%%%%%%%%% 77 % The cell array filecell is the list of input file names, while 78 % filecell{iview,fileindex}: 79 % iview: line in the table corresponding to a given file series 80 % fileindex: file index within the file series, 81 % 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 82 % i1_series(iview,fileindex) expresses the same indices as a 1D array in file indices 83 %%%%%%%%%%%% 86 84 NbSlice=1;%default 87 if isfield(Param.IndexRange,'NbSlice') 85 if isfield(Param.IndexRange,'NbSlice')&&~isempty(Param.IndexRange.NbSlice) 88 86 NbSlice=Param.IndexRange.NbSlice; 89 87 end 90 88 nbview=numel(i1_series);%number of input file series (lines in InputTable) 91 nbfield_j=size(i1_series{1},1); %nb of consecutive fields at each level(burst 92 nbfield=nbfield_j*size(i1_series{1},2); %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 89 nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices) 90 nbfield_i=size(i1_series{1},2); %nb of fields for the i index 91 nbfield=nbfield_j*nbfield_i; %total number of fields 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 … … 123 122 stopstate=get(hseries.RUN,'BusyAction'); 124 123 if isequal(stopstate,'queue')% enable STOP command 125 update_waitbar(hseries. waitbar_frame,WaitbarPos,ifile/nbfield_i)124 update_waitbar(hseries.Waitbar,ifile/nbfield_i) 126 125 file=filecell{iview,index_slice(ifile)}; 127 126 [Path,Name,ext]=fileparts(file);
Note: See TracChangeset
for help on using the changeset viewer.