- Timestamp:
- Feb 24, 2014, 10:51:40 PM (11 years ago)
- Location:
- trunk/src/series
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/aver_stat.m
r673 r716 42 42 43 43 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName 44 if isstruct(Param) && isequal(Param.Action.RUN,0) 44 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 45 45 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 46 46 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) … … 53 53 ParamOut.OutputDirExt='.stat';%set the output dir extension 54 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') 55 % check the existence of the first file in the series 56 first_j=[]; 57 if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end 58 last_j=[]; 59 if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end 60 PairString=''; 61 if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end 62 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString); 63 FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 64 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 65 if ~exist(FirstFileName,'file') 66 msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist']) 67 else 68 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.last_i,last_j,PairString); 69 LastFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 70 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 71 if ~exist(FirstFileName,'file') 72 msgbox_uvmat('WARNING',['the last input file ' LastFileName ' does not exist']) 73 end 58 74 end 59 75 return -
trunk/src/series/civ_input.m
r711 r716 57 57 set(hObject,'WindowButtonDownFcn',{'mouse_down'}) % allows mouse action with right button (zoom for uicontrol display) 58 58 hseries=findobj(allchild(0),'Tag','series'); 59 SeriesData.ParentHandle=hseries; 59 hhseries=guidata(hseries); 60 %SeriesData.ParentHandle=hseries; 60 61 SeriesData=get(hseries,'UserData'); 61 62 % relevant data in gcbf:.FileType,.FileInfo,.Time,.TimeUnit,.GeometryCalib{1}; … … 87 88 NomTypeInput=Param.InputTable{1,4}; 88 89 FileExt=Param.InputTable{1,5}; 90 FileType='image';%fdefault 91 FileInfo=[]; 89 92 if isfield(SeriesData,'FileType')&&isfield(SeriesData,'FileInfo') 90 93 FileType=SeriesData.FileType{1};%type of the first input file series 91 94 FileInfo=SeriesData.FileInfo{1}; 92 95 else 93 msgbox_uvmat('ERROR','please refresh the input file series') 94 return 96 set(hhseries.REFRESH,'BackgroundColor',[1 0 1]) 97 % msgbox_uvmat('ERROR','please refresh the input file series') 98 % return 95 99 end 96 100 … … 127 131 [PathCiv2_ImageB,Civ2_ImageB,FileExtA]=fileparts(Data.Civ2_ImageB); 128 132 end 129 hhseries=guidata(hseries);130 133 if size(Param.InputTable,1)==1 131 134 series('display_file_name',hhseries,Data.Civ1_ImageA,'append');%append the image series to the input list … … 146 149 return 147 150 end 148 if numel(SeriesData.FileType)>=2 && strcmp(SeriesData.FileType{end-1},'image') && strcmp(SeriesData.FileType{end},'image')151 if isfield(SeriesData,'FileType') && numel(SeriesData.FileType)>=2 && strcmp(SeriesData.FileType{end-1},'image') && strcmp(SeriesData.FileType{end},'image') 149 152 set(handles.ListCompareMode,'Value',3)% we compare two image series term to term ('shift') 150 153 set(handles.PairIndices,'Visible','off') … … 198 201 MaxIndex_j=1;%default 199 202 MinIndex_j=1; 200 if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j') 203 if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j')... 204 && numel(Param.IndexRange.MaxIndex_j')>=iview_image &&numel(Param.IndexRange.MinIndex_j')>=iview_image 201 205 MaxIndex_j=Param.IndexRange.MaxIndex_j(iview_image); 202 206 MinIndex_j=Param.IndexRange.MinIndex_j(iview_image); … … 214 218 set(handles.ListPairMode,'Value',1)% advice 'pair j1-j2' except in MaxIndex_j is large 215 219 end 216 %elseif ~(strcmp(FileType,'video') || strcmp(FileType,'mmreader'))217 220 else 218 221 set(handles.ListPairMode,'String',{'pair j1-j2';'series(Dj)';'series(Di)'})%multiple choice … … 284 287 %% introduce the stored parameters if relevant 285 288 if isfield(Param,'ActionInput') 286 fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param 289 fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param 290 hcheckgrid=findobj(handles.civ_input,'Tag','CheckGrid'); 291 for ilist=1:numel(hcheckgrid) 292 if get(hcheckgrid(ilist),'Value') 293 hparent=get(hcheckgrid(ilist),'parent');%handles of the parent panel 294 hchildren=get(hparent,'children'); 295 handle_txtbox=findobj(hchildren,'tag','Grid');% look for the grid name box in the same panel 296 handle_dx=findobj(hchildren,'tag','num_Dx'); 297 handle_dy=findobj(hchildren,'tag','num_Dy'); 298 handle_title_dx=findobj(hchildren,'tag','title_Dx'); 299 handle_title_dy=findobj(hchildren,'tag','title_Dy'); 300 set(handle_dx,'Visible','off'); 301 set(handle_dy,'Visible','off'); 302 set(handle_title_dy,'Visible','off'); 303 set(handle_title_dx,'Visible','off'); 304 end 305 end 287 306 end 288 307 … … 343 362 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 344 363 % the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists 345 %[RootPath,Civ1_ImageA,Civ2_ImageB,i1_series,tild,j1_series,tild,NomTypeIma,FileType,MovieObject]=find_file_series(FilePath,[FileName ImaExt]);346 364 switch Param.FileType{1} 347 365 case {'image','multimage','video','mmreader'} -
trunk/src/series/civ_series.m
r711 r716 43 43 addpath(fullfile(path_series,'series')) 44 44 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed 45 if isstruct(Param) && isequal(Param.Action.RUN,0) 45 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 46 46 Data=civ_input(Param);% introduce the civ parameters using the GUI civ_input 47 47 if isempty(Data) … … 60 60 Data.OutputSubDirMode='last'; %select the last subDir in the input table as root of the output subdir name (option 'all'/'first'/'last', 'all' by default) 61 61 Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar) 62 filecell=get_file_series(Param);%check existence of the first input file 63 if ~exist(filecell{1,1},'file') 64 msgbox_uvmat('WARNING','the first input file does not exist') 62 % check the existence of the first file in the series 63 first_j=[]; 64 if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end 65 last_j=[]; 66 if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end 67 PairString=''; 68 if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end 69 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString); 70 FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 71 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 72 if ~exist(FirstFileName,'file') 73 msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist']) 65 74 else 66 FileType=get_file_type( filecell{1,1});75 FileType=get_file_type(FirstFileName); 67 76 if isempty(find(strcmp(FileType,{'civdata','image','multimage','mmreader','video'})));% =1 for images 68 77 msgbox_uvmat('ERROR',['bad input file type for ' mfilename ': an image or civdata file is needed']) -
trunk/src/series/merge_proj.m
r676 r716 54 54 ParamOut.OutputDirExt='.mproj';%set the output dir extension 55 55 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 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') 56 %check the input files 57 first_j=[]; 58 if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end 59 last_j=[]; 60 if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end 61 PairString=''; 62 if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end 63 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString); 64 FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 65 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 66 if ~exist(FirstFileName,'file') 67 msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist']) 59 68 elseif isequal(size(Param.InputTable,1),1) && ~isfield(Param,'ProjObject') 60 69 msgbox_uvmat('WARNING','You may need a projection object of type plane for merge_proj') -
trunk/src/series/sub_background.m
r700 r716 67 67 68 68 %% root input file(s) and type 69 [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param); 70 if ~exist(filecell{1,1},'file') 71 msgbox_uvmat('WARNING','the first input file does not exist') 72 return 73 end 74 69 % check the existence of the first file in the series 70 first_j=[]; 71 if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end 72 last_j=[]; 73 if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end 74 PairString=''; 75 if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end 76 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString); 77 FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 78 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 79 if ~exist(FirstFileName,'file') 80 msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist']) 81 else 82 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.last_i,last_j,PairString); 83 LastFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 84 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 85 if ~exist(FirstFileName,'file') 86 msgbox_uvmat('WARNING',['the last input file ' LastFileName ' does not exist']) 87 end 88 end 89 75 90 %% check the validity of input file types 76 91 ImageTypeOptions={'image','multimage','mmreader','video'};%allowed input file types(images) 77 FileType=get_file_type( filecell{1,1});92 FileType=get_file_type(FirstFileName); 78 93 CheckImage=~isempty(find(strcmp(FileType,ImageTypeOptions), 1));% =1 for images 79 94 if ~CheckImage … … 88 103 end 89 104 %nbview=numel(i1_series);%number of input file series (lines in InputTable) 90 nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices) 105 nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices)%A CORRIGER !!!!!!! 91 106 nbfield_i=size(i1_series{1},2); %nb of fields for the i index 92 107 nbfield=nbfield_j*nbfield_i; %total number of fields -
trunk/src/series/time_series.m
r676 r716 43 43 44 44 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed 45 if isstruct(Param) && isequal(Param.Action.RUN,0) 45 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN 46 46 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 47 47 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) … … 55 55 ParamOut.OutputDirExt='.tseries';%set the output dir extension 56 56 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 57 filecell=get_file_series(Param);%check existence of the first input file 58 if ~exist(filecell{1,1},'file') 59 msgbox_uvmat('WARNING','the first input file does not exist') 57 % check the existence of the first file in the series 58 first_j=[]; 59 if isfield(Param.IndexRange,'first_j'); first_j=Param.IndexRange.first_j; end 60 last_j=[]; 61 if isfield(Param.IndexRange,'last_j'); last_j=Param.IndexRange.last_j; end 62 PairString=''; 63 if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end 64 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString); 65 FirstFileName=fullfile_uvmat(Param.InputTable{1,1},Param.InputTable{1,2},Param.InputTable{1,3},... 66 Param.InputTable{1,5},Param.InputTable{1,4},i1,i2,j1,j2); 67 if ~exist(FirstFileName,'file') 68 msgbox_uvmat('WARNING',['the first input file ' FirstFileName ' does not exist']) 60 69 elseif isequal(size(Param.InputTable,1),1) && ~isfield(Param,'ProjObject') 61 70 msgbox_uvmat('WARNING','a projection object needs to be introduced for time_series')
Note: See TracChangeset
for help on using the changeset viewer.