Changeset 594 for trunk/src/series
- Timestamp:
- Mar 26, 2013, 9:56:10 PM (12 years ago)
- Location:
- trunk/src/series
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r592 r594 62 62 63 63 %%%%%%%%%%%% STANDARD PART %%%%%%%%%%%% 64 ParamOut=[]; 64 65 %% read input parameters from an xml file if input is a file name (batch mode) 65 66 checkrun=1; -
trunk/src/series/check_data_files.m
r592 r594 34 34 function ParamOut=check_data_files(Param) 35 35 36 % %% set the input elements needed on the GUI series when the action is selected in the menu ActionName37 % if ~exist('Param','var') % case with no input parameter38 % ParamOut={'NbViewMax';'';...% max nbre of input file series (default='' , no limitation)39 % 'AllowInputSort';'off';...% allow alphabetic sorting of the list of input files (options 'off'/'on', 'off' by default)40 % 'NbSlice';'on'; ...%nbre of slices ('off' by default)41 % 'VelType';'off';...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default)42 % 'FieldName';'off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)43 % 'FieldTransform'; 'off';...%can use a transform function44 % 'ProjObject';'off';...%can use projection object(option 'off'/'on',45 % 'Mask';'off';...%can use mask option (option 'off'/'on', 'off' by default)46 % 'OutputDirExt';'';...%set the output dir extension47 % ''};48 % return49 % end50 36 %% input preparation mode (no RUN) 51 37 if isstruct(Param) && isequal(Param.Action.RUN,0) 52 ParamOut.AllowInputSort='off'; ...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)53 ParamOut.WholeIndexRange='off'; ...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)54 ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default)55 ParamOut.VelType='off'; ...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default)56 ParamOut.FieldName='off'; ...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)57 ParamOut.FieldTransform = 'off'; ...%can use a transform function58 ParamOut.ProjObject='off'; ...%can use projection object(option 'off'/'on',59 ParamOut.Mask='off'; ...%can use mask option (option 'off'/'on', 'off' by default)38 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 39 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 40 ParamOut.NbSlice='on';%nbre of slices ('off' by default) 41 ParamOut.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 42 ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 43 ParamOut.FieldTransform = 'off';%can use a transform function 44 ParamOut.ProjObject='off';%can use projection object(option 'off'/'on', 45 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) 60 46 ParamOut.OutputDirExt='';%set the output dir extension (blank=no output dir) 61 47 return 62 48 end 63 49 %%%%%%%%%%%% STANDARD PART %%%%%%%%%%%% 64 %% select different modes, RUN, parameter input, BATCH 65 % BATCH case: read the xml file for batch case 50 51 %% read input parameters from an xml file if input is a file name (batch mode) 52 checkrun=1; 66 53 if ischar(Param) 67 Param=xml2struct(Param); 68 checkrun=0; 69 % RUN case: parameters introduced as the input structure Param 70 else 71 if isfield(Param,'Specific')&& strcmp(Param.Specific,'?') 72 checkrun=1;% will only search interactive input parameters (preparation of BATCH mode) 73 else 74 checkrun=2; % indicate the RUN option is used 75 end 76 hseries=guidata(Param.hseries);%handles of the GUI series 54 Param=xml2struct(Param);% read Param as input file (batch case) 55 checkrun=0; 77 56 end 78 ParamOut=Param; %default output 79 %OutputDir=[Param.OutputSubDir Param.OutputDirExt];NO OUTPUT FILE 80 57 81 58 %% root input file(s) and type 82 59 RootPath=Param.InputTable(:,1); … … 126 103 Tabchar{4}=FileInfo.ImageType; 127 104 Tabchar{5}=[' compression' FileInfo.VideoCompression]; 128 Tabchar{6}=[ 'quality ' num2str(FileInfo.Quality)]; 105 Tabchar{6}=[ 'quality ' num2str(FileInfo.Quality)]; 129 106 else 130 107 Tabchar={}; … … 135 112 datnum=zeros(1,nbfield_j); 136 113 for ifile=1:nbfield_i 137 stopstate=get(hseries.RUN,'BusyAction'); 114 if checkrun 115 stopstate=get(Param.RUNHandle,'BusyAction'); 116 update_waitbar(Param.WaitbarHandle,ifile/nbfield_i) 117 else 118 stopstate='queue'; 119 end 138 120 if isequal(stopstate,'queue')% enable STOP command 139 update_waitbar(hseries.Waitbar,ifile/nbfield_i)140 121 file=filecell{iview,index_slice(ifile)}; 141 122 [Path,Name,ext]=fileparts(file); … … 148 129 datnum(ifile)=datfile.datenum; 149 130 filefound(ifile)={datfile.name}; 150 end 131 end 151 132 lastfield=''; 152 133 [FileType{iview},FileInfo,Object]=get_file_type(file); 153 134 if strcmp(FileType{iview},'civx')||strcmp(FileType{iview},'civdata') 154 135 if isfield(FileInfo,'CivStage') 155 liststage={'civ1','fix1','patch1','civ2','fix2','patch2'};156 lastfield=liststage{FileInfo.CivStage};136 liststage={'civ1','fix1','patch1','civ2','fix2','patch2'}; 137 lastfield=liststage{FileInfo.CivStage}; 157 138 end 158 139 end 159 lastfield=[FileType{iview} ', ' lastfield]; 140 lastfield=[FileType{iview} ', ' lastfield]; 160 141 end 161 142 Tabchar(1,i_slice)={['slice #' num2str(i_slice)]}; … … 168 149 message=['no set of ' num2str(NbSlice) ' (NbSlices) files found']; 169 150 else 170 151 message='no file found'; 171 152 end 172 153 else … … 177 158 message={['oldest modification: ' filefound{ind} ' : ' datestr(first)];... 178 159 ['latest modification: ' filefound{indlast} ' : ' datestr(last)]}; 179 end 160 end 180 161 if ~isempty(Tabchar) 181 Tabchar=reshape(Tabchar,NbSlice*(nbfield_i+1),1);162 Tabchar=reshape(Tabchar,NbSlice*(nbfield_i+1),1); 182 163 end 183 164 end
Note: See TracChangeset
for help on using the changeset viewer.