Changeset 605 for trunk/src/series
- Timestamp:
- Apr 5, 2013, 1:17:53 PM (12 years ago)
- Location:
- trunk/src/series
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r598 r605 43 43 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName 44 44 if isstruct(Param) && isequal(Param.Action.RUN,0) 45 ParamOut.AllowInputSort='off'; ...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)46 ParamOut.WholeIndexRange='off'; ...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)47 ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default)48 ParamOut.VelType='two'; ...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default)49 ParamOut.FieldName='two'; ...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)50 ParamOut.FieldTransform = 'on'; ...%can use a transform function51 ParamOut.ProjObject='on'; ...%can use projection object(option 'off'/'on',52 ParamOut.Mask='off'; ...%can use mask option (option 'off'/'on', 'off' by default)45 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 46 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 47 ParamOut.NbSlice='on'; %nbre of slices ('off' by default) 48 ParamOut.VelType='two';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 49 ParamOut.FieldName='two';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 50 ParamOut.FieldTransform = 'on';%can use a transform function 51 ParamOut.ProjObject='on';%can use projection object(option 'off'/'on', 52 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) 53 53 ParamOut.OutputDirExt='.stat';%set the output dir extension 54 return 54 ParamOut.OutputFileMode='NbSlice';% '=NbInput': 1 output file per input file index, '=NbInput_i': 1 file per input file index i, '=NbSlice': 1 file per slice 55 filecell=get_file_series(Param);%check existence of the first input file 56 if ~exist(filecell{1,1},'file') 57 msgbox_uvmat('WARNING','the first input file does not exist') 58 end 59 return 55 60 end 56 61 -
trunk/src/series/civ_series.m
r604 r605 59 59 end 60 60 61 %%%%%%%%%%%% STANDARD PART (DO NOT EDIT) %%%%%%%%%%%%62 63 61 %% read input parameters from an xml file if input is a file name (batch mode) 64 62 checkrun=1; … … 67 65 checkrun=0; 68 66 end 67 68 %% input files and indexing 69 NbField=1; 70 if isfield(Param,'InputTable') 71 RootPath=Param.InputTable{1,1}; 72 RootFile=Param.InputTable{1,3}; 73 SubDir=Param.InputTable{1,2}; 74 NomType=Param.InputTable{1,4}; 75 FileExt=Param.InputTable{1,5}; 76 PairCiv1=Param.ActionInput.PairIndices.ListPairCiv1; 77 PairCiv2=''; 78 if isfield(Param.ActionInput.PairIndices,'ListPairCiv2') 79 PairCiv2=Param.ActionInput.PairIndices.ListPairCiv2; 80 end 81 MaxIndex=cell2mat(Param.IndexRange.MaxIndex); 82 MinIndex=cell2mat(Param.IndexRange.MinIndex); 83 [filecell,i_series,tild,j_series]=get_file_series(Param); 84 [i1_series_Civ1,i2_series_Civ1,j1_series_Civ1,j2_series_Civ1,check_bounds,NomTypeNc]=... 85 find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex,MaxIndex); 86 if ~isempty(PairCiv2) 87 [i1_series_Civ2,i2_series_Civ2,j1_series_Civ2,j2_series_Civ2,check_bounds_Civ2]=... 88 find_pair_indices(PairCiv2,i_series{1},j_series{1},MinIndex,MaxIndex); 89 check_bounds=check_bounds | check_bounds_Civ2; 90 end 91 i1_series_Civ1=i1_series_Civ1(~check_bounds); 92 i2_series_Civ1=i2_series_Civ1(~check_bounds); 93 j1_series_Civ1=j1_series_Civ1(~check_bounds); 94 j2_series_Civ1=j2_series_Civ1(~check_bounds); 95 if ~isempty(j1_series_Civ1) 96 FrameIndex_A_Civ1=j1_series_Civ1; 97 FrameIndex_B_Civ1=j2_series_Civ1; 98 else 99 FrameIndex_A_Civ1=i1_series_Civ1; 100 FrameIndex_B_Civ1=i2_series_Civ1; 101 end 102 if ~isempty(PairCiv2) 103 i1_series_Civ2=i1_series_Civ2(~check_bounds); 104 i2_series_Civ2=i2_series_Civ2(~check_bounds); 105 j1_series_Civ2=j1_series_Civ2(~check_bounds); 106 j2_series_Civ2=j2_series_Civ2(~check_bounds); 107 if ~isempty(j1_series_Civ2) 108 FrameIndex_A_Civ2=j1_series_Civ2; 109 FrameIndex_B_Civ2=j2_series_Civ2; 110 else 111 FrameIndex_A_Civ2=i1_series_Civ2; 112 FrameIndex_B_Civ2=i2_series_Civ2; 113 end 114 end 115 116 NbField=numel(i1_series_Civ1); 117 ImageTypeOptions={'image','multimage','mmreader','video'}; 118 [FileType_A,FileInfo,MovieObject_A]=get_file_type(filecell{1,1}); 119 FileType_B=FileType_A; 120 MovieObject_B=MovieObject_A; 121 if size(filecell,1)>=2 && ~strcmp(filecell{1,1},filecell{2,1}) 122 [FileType_B,FileInfo,MovieObject_B]=get_file_type(filecell{2,1}); 123 CheckImage_B=~isempty(find(strcmp(FileType,ImageTypeOptions)));% =1 for images 124 end 125 end 126 127 128 %% Output directory 69 129 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 70 130 … … 81 141 check_patch1=0;%default 82 142 83 % case of input Param set by an xml file (batch mode) 84 if ischar(Param) 85 Param=xml2struct(Param); %if Param is the name of an xml file, read this file as a Matlab structure 86 end 87 88 RootPath=Param.InputTable{1,1}; 89 RootFile=Param.InputTable{1,3}; 90 SubDir=Param.InputTable{1,2}; 91 NomType=Param.InputTable{1,4}; 92 FileExt=Param.InputTable{1,5}; 93 PairCiv1=Param.ActionInput.PairIndices.ListPairCiv1; 94 PairCiv2=''; 95 if isfield(Param.ActionInput.PairIndices,'ListPairCiv2') 96 PairCiv2=Param.ActionInput.PairIndices.ListPairCiv2; 97 end 98 99 % option use with GUI series 100 NbField=1; 101 MovieObject_A=[]; 102 if isfield(Param,'InputTable') 103 MaxIndex=cell2mat(Param.IndexRange.MaxIndex); 104 MinIndex=cell2mat(Param.IndexRange.MinIndex); 105 [filecell,i_series,tild,j_series]=get_file_series(Param); 106 [i1_series_Civ1,i2_series_Civ1,j1_series_Civ1,j2_series_Civ1,check_bounds,NomTypeNc]=... 107 find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex,MaxIndex); 108 if ~isempty(PairCiv2) 109 [i1_series_Civ2,i2_series_Civ2,j1_series_Civ2,j2_series_Civ2,check_bounds_Civ2]=... 110 find_pair_indices(PairCiv2,i_series{1},j_series{1},MinIndex,MaxIndex); 111 check_bounds=check_bounds | check_bounds_Civ2; 112 end 113 i1_series_Civ1=i1_series_Civ1(~check_bounds); 114 i2_series_Civ1=i2_series_Civ1(~check_bounds); 115 j1_series_Civ1=j1_series_Civ1(~check_bounds); 116 j2_series_Civ1=j2_series_Civ1(~check_bounds); 117 if ~isempty(j1_series_Civ1) 118 FrameIndex_A_Civ1=j1_series_Civ1; 119 FrameIndex_B_Civ1=j2_series_Civ1; 120 else 121 FrameIndex_A_Civ1=i1_series_Civ1; 122 FrameIndex_B_Civ1=i2_series_Civ1; 123 end 124 if ~isempty(PairCiv2) 125 i1_series_Civ2=i1_series_Civ2(~check_bounds); 126 i2_series_Civ2=i2_series_Civ2(~check_bounds); 127 j1_series_Civ2=j1_series_Civ2(~check_bounds); 128 j2_series_Civ2=j2_series_Civ2(~check_bounds); 129 if ~isempty(j1_series_Civ2) 130 FrameIndex_A_Civ2=j1_series_Civ2; 131 FrameIndex_B_Civ2=j2_series_Civ2; 132 else 133 FrameIndex_A_Civ2=i1_series_Civ2; 134 FrameIndex_B_Civ2=i2_series_Civ2; 135 end 136 end 137 138 NbField=numel(i1_series_Civ1); 139 ImageTypeOptions={'image','multimage','mmreader','video'}; 140 [FileType_A,FileInfo,MovieObject_A]=get_file_type(filecell{1,1}); 141 FileType_B=FileType_A; 142 MovieObject_B=MovieObject_A; 143 if size(filecell,1)>=2 && ~strcmp(filecell{1,1},filecell{2,1}) 144 [FileType_B,FileInfo,MovieObject_B]=get_file_type(filecell{2,1}); 145 CheckImage_B=~isempty(find(strcmp(FileType,ImageTypeOptions)));% =1 for images 146 end 147 end 143 144 145 148 146 149 147 %%%%% MAIN LOOP %%%%%% -
trunk/src/series/merge_proj.m
r596 r605 41 41 function ParamOut=merge_proj(Param) 42 42 43 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName43 %% set the input elements needed on the GUI series when the function is selected in the menu ActionName 44 44 if isstruct(Param) && isequal(Param.Action.RUN,0) 45 45 ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) … … 52 52 ParamOut.Mask='off';...%can use mask option (option 'off'/'on', 'off' by default) 53 53 ParamOut.OutputDirExt='.mproj';%set the output dir extension 54 ParamOut.OutputFileMode='NbInput';% '=NbInput': 1 output file per input file index, '=NbInput_i': 1 file per input file index i, '=NbSlice': 1 file per slice 55 filecell=get_file_series(Param);%check existence of the first input file 56 if ~exist(filecell{1,1},'file') 57 msgbox_uvmat('WARNING','the first input file does not exist') 58 elseif isequal(size(Param.InputTable,1),1) && ~isfield(Param,'ProjObject') 59 msgbox_uvmat('WARNING','a projection object of type plane needs to be introduced for merge_proj') 60 end 54 61 return 55 62 end -
trunk/src/series/sub_background.m
r599 r605 56 56 %% input preparation mode (no RUN) 57 57 if isstruct(Param) && isequal(Param.Action.RUN,0) 58 ParamOut.AllowInputSort='off'; ...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)59 ParamOut.WholeIndexRange='on'; ...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)60 ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default)61 ParamOut.VelType='off'; ...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default)62 ParamOut.FieldName='off'; ...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)63 ParamOut.FieldTransform = 'off'; ...%can use a transform function64 ParamOut.ProjObject='off'; ...%can use projection object(option 'off'/'on',65 ParamOut.Mask='off'; ...%can use mask option (option 'off'/'on', 'off' by default)58 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 59 ParamOut.WholeIndexRange='on';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 60 ParamOut.NbSlice='on'; %nbre of slices ('off' by default) 61 ParamOut.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 62 ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 63 ParamOut.FieldTransform = 'off';%can use a transform function 64 ParamOut.ProjObject='off';%can use projection object(option 'off'/'on', 65 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) 66 66 ParamOut.OutputDirExt='.sback';%set the output dir extension 67 67 ParamOut.OutputFileMode='NbInput';% '=NbInput': 1 output file per input file index, '=NbInput_i': 1 file per input file index i, '=NbSlice': 1 file per slice 68 filecell=get_file_series(Param);%check existence of the first input file 68 69 %%%%%%%%%%%% STANDARD PART (DO NOT EDIT) %%%%%%%%%%%% 69 70 70 71 %% root input file(s) and type 71 % RootPath=Param.InputTable(:,1);72 % RootFile=Param.InputTable(:,3);73 % SubDir=Param.InputTable(:,2);74 % NomType=Param.InputTable(:,4);75 % FileExt=Param.InputTable(:,5);76 72 [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 73 if ~exist(filecell{1,1},'file') 74 msgbox_uvmat('WARNING','the first input file does not exist') 75 return 76 end 77 77 %%%%%%%%%%%% 78 78 % The cell array filecell is the list of input file names, while -
trunk/src/series/time_series.m
r599 r605 44 44 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName 45 45 if isstruct(Param) && isequal(Param.Action.RUN,0) 46 ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 47 ParamOut.WholeIndexRange='off';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 48 ParamOut.NbSlice='on'; ...%nbre of slices ('off' by default) 49 ParamOut.VelType='two';...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 50 ParamOut.FieldName='two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 51 ParamOut.FieldTransform = 'on';...%can use a transform function 52 ParamOut.ProjObject='on';...%can use projection object(option 'off'/'on', 53 ParamOut.Mask='off';...%can use mask option (option 'off'/'on', 'off' by default) 54 ParamOut.OutputDirExt='.tseries';%set the output dir extension 46 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 47 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 48 ParamOut.NbSlice='on'; %nbre of slices ('off' by default) 49 ParamOut.VelType='two';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 50 ParamOut.FieldName='two';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 51 ParamOut.FieldTransform = 'on';%can use a transform function 52 ParamOut.ProjObject='on';%can use projection object(option 'off'/'on', 53 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) 54 ParamOut.OutputDirExt='.tseries';%set the output dir extension 55 ParamOut.OutputFileMode='NbSlice';% '=NbInput': 1 output file per input file index, '=NbInput_i': 1 file per input file index i, '=NbSlice': 1 file per slice 56 filecell=get_file_series(Param);%check existence of the first input file 57 if ~exist(filecell{1,1},'file') 58 msgbox_uvmat('WARNING','the first input file does not exist') 59 elseif isequal(size(Param.InputTable,1),1) && ~isfield(Param,'ProjObject') 60 msgbox_uvmat('WARNING','a projection object needs to be introduced for time_series') 61 end 55 62 return 56 63 end
Note: See TracChangeset
for help on using the changeset viewer.